1 | <?php |
||
11 | class Simple implements Renderable |
||
12 | { |
||
13 | /** |
||
14 | * @var Grid |
||
15 | */ |
||
16 | protected $grid; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $model; |
||
22 | |||
23 | /** |
||
24 | * @param null $key |
||
25 | * @return string |
||
26 | */ |
||
27 | public function render($key = null) |
||
45 | |||
46 | /** |
||
47 | * @param string $name |
||
48 | * @param array $arguments |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function __call($name, $arguments) |
||
55 | } |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: