문제

I have a class, which involves traits:

class Dynamic
{
   use Trait1, Trait2;

   public function method3(){};
}

So I need, when i'm trying to use this class like

$obj = new Dynamic(); 
$obj->getName(); // method from the Trait1

get some notifications that methods from the trait were called.

Can you advice some method for this task?

도움이 되었습니까?

해결책

This seems expected, no?

__call() is triggered when invoking inaccessible methods in an object context.

http://us2.php.net/manual/en/language.oop5.overloading.php

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top