1 | <?php |
||
5 | class Constants extends AbstractSystem |
||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | * @return null |
||
10 | */ |
||
11 | public function __invoke() |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | * Define all constants |
||
19 | */ |
||
20 | public function init() |
||
38 | |||
39 | /** |
||
40 | * Obtain the path of the application root directory |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | protected function obtainRootDir() |
||
51 | } |
||
52 |
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: