1 | <?php |
||
8 | class Email extends Field { |
||
9 | |||
10 | protected $value = ''; |
||
11 | 8 | ||
12 | public function getValue() |
||
16 | 12 | ||
17 | public function getButtonName() |
||
21 | 4 | ||
22 | public function renderWith() |
||
26 | 11 | ||
27 | public function setValueFromDefault() |
||
31 | 1 | ||
32 | public function setValueFromModel($model) |
||
36 | |||
37 | public function setValueFromRequest($request) |
||
41 | 1 | ||
42 | public function fillModelWithValue($model) |
||
46 | 2 | ||
47 | public function validate() |
||
51 | 2 | ||
52 | public function validateEmail() |
||
56 | 3 | ||
57 | public function validateRequired() |
||
61 | |||
62 | } |
||
63 |
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: