1 | <?php |
||
7 | trait PropertyAccessTrait |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * Magic Getter |
||
12 | * |
||
13 | * @param string $name |
||
14 | * |
||
15 | * @return mixed |
||
16 | */ |
||
17 | 6 | public function __get($name) |
|
24 | |||
25 | /** |
||
26 | * Returns the value of a property |
||
27 | * |
||
28 | * @param string $name |
||
29 | * |
||
30 | * @return mixed |
||
31 | */ |
||
32 | 5 | private function getValue($name) |
|
41 | |||
42 | /** |
||
43 | * Magic setter |
||
44 | * |
||
45 | * @param string $name |
||
46 | * @param mixed $value |
||
47 | */ |
||
48 | 4 | public function __set($name, $value) |
|
55 | |||
56 | /** |
||
57 | * Sets the value of a property |
||
58 | * |
||
59 | * @param string $name |
||
60 | * @param mixed $value |
||
61 | */ |
||
62 | 4 | private function setValue($name, $value) |
|
71 | |||
72 | /** |
||
73 | * Sets properties from array |
||
74 | * |
||
75 | * @param array $values |
||
76 | */ |
||
77 | 1 | public function fill(array $values) |
|
85 | |||
86 | /** |
||
87 | * Returns estimated getter method |
||
88 | * |
||
89 | * @param string $name |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | 4 | protected function getSetterMethod($name) |
|
97 | |||
98 | /** |
||
99 | * Returns estimated setter method |
||
100 | * |
||
101 | * @param string $name |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | 5 | protected function getGetterMethod($name) |
|
109 | |||
110 | /** |
||
111 | * Convert a value to studly caps case. |
||
112 | * |
||
113 | * @param string $value |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | 5 | private function studly($value) |
|
122 | } |
||
123 |