1 | <?php |
||
20 | class AbstractFormDefinition |
||
21 | { |
||
22 | use MagicMethodsTrait; |
||
23 | use ParentsTrait { |
||
24 | setParents as private setParentsInternal; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $parentsAttached = false; |
||
31 | |||
32 | /** |
||
33 | * @todo |
||
34 | */ |
||
35 | protected function checkDefinitionFreezeState() |
||
41 | |||
42 | /** |
||
43 | * @return bool |
||
44 | */ |
||
45 | protected function isDefinitionFrozen() |
||
50 | |||
51 | /** |
||
52 | * @return FormDefinitionState |
||
53 | */ |
||
54 | protected function getDefinitionState() |
||
64 | |||
65 | /** |
||
66 | * @param array $parents |
||
67 | */ |
||
68 | public function setParents(array $parents) |
||
75 | |||
76 | /** |
||
77 | * @todo |
||
78 | * |
||
79 | * @param mixed $name |
||
80 | * @param array $arguments |
||
81 | * @return mixed |
||
82 | * @throws MethodNotFoundException |
||
83 | */ |
||
84 | public function __call($name, $arguments) |
||
102 | |||
103 | /** |
||
104 | * @todo |
||
105 | */ |
||
106 | private function throwFrozenStateException() |
||
110 | } |
||
111 |
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: