1 | <?php |
||
10 | trait AccessorTrait |
||
11 | { |
||
12 | private $container = []; |
||
13 | |||
14 | /** |
||
15 | * @param $methodName string Key |
||
16 | * @param $args array Method Arguments |
||
17 | * |
||
18 | * @return mixed |
||
19 | */ |
||
20 | public function __call($methodName, $args) |
||
42 | |||
43 | /** |
||
44 | * @param $property string Key |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function get($property) |
||
56 | |||
57 | /** |
||
58 | * @param $property string Key |
||
59 | * @param $value string Value |
||
60 | * |
||
61 | * @return self |
||
62 | */ |
||
63 | public function set($property, $value) |
||
69 | |||
70 | /** |
||
71 | * Check if args are valid or not. |
||
72 | * |
||
73 | * @param array $args List of arguments |
||
74 | * @param int $min integer Minimum valid params |
||
75 | * @param int $max Maximum valid params |
||
76 | * @param string $methodName Method name |
||
77 | */ |
||
78 | protected function checkArguments(array $args, $min, $max, $methodName) |
||
85 | |||
86 | /** |
||
87 | * @return array |
||
88 | */ |
||
89 | public function getContainer() |
||
93 | } |
||
94 |