| 1 | <?php |
||
| 20 | class EloquentSetting implements SettingInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var SystemSetting |
||
| 24 | */ |
||
| 25 | private $model; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * EloquentSetting constructor. |
||
| 29 | * @param SystemSetting $model |
||
| 30 | */ |
||
| 31 | 6 | public function __construct(SystemSetting $model) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $settings |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 6 | public function setSetting(array $settings) |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @param $key |
||
| 61 | * @param null $input |
||
| 62 | * @return bool|mixed|string |
||
| 63 | */ |
||
| 64 | 1 | public function getSetting($key,$input=null) |
|
| 79 | |||
| 80 | /** |
||
| 81 | * @return array |
||
| 82 | */ |
||
| 83 | 3 | public function allToArray() |
|
| 92 | } |
||
| 93 |
If you implement
__calland 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
__callis implemented by a parent class and only the child class knows which methods exist: