1 | <?php |
||
8 | trait AccessorTrait |
||
9 | { |
||
10 | /** |
||
11 | * @var bool |
||
12 | */ |
||
13 | private $__initProps = false; |
||
14 | |||
15 | /** |
||
16 | * @var Prop[] |
||
17 | */ |
||
18 | private $__props = array(); |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $__namespace; |
||
24 | |||
25 | /** |
||
26 | * can't be final, cause doctrine proxy |
||
27 | * |
||
28 | * @param string $name |
||
29 | * @param array $arguments |
||
30 | * @return mixed |
||
31 | * @throws \Exception |
||
32 | */ |
||
33 | public function __call($name, array $arguments = array()) |
||
37 | |||
38 | /** |
||
39 | * needed by symfony/property-access |
||
40 | * can't be final, cause doctrine proxy |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public function __get($name) |
||
49 | |||
50 | /** |
||
51 | * needed by symfony/property-access |
||
52 | * can't be final, cause doctrine proxy |
||
53 | * |
||
54 | * @param string $name |
||
55 | * @param mixed $value |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function __set($name, $value) |
||
62 | |||
63 | /** |
||
64 | * @param string $name |
||
65 | * @param array $arguments |
||
66 | * @return mixed |
||
67 | * @throws \Exception |
||
68 | */ |
||
69 | private function __handleCall($name, array $arguments) |
||
99 | |||
100 | /** |
||
101 | * @param string $name |
||
102 | * @return mixed |
||
103 | */ |
||
104 | private function __handleGet($name) |
||
110 | |||
111 | /** |
||
112 | * @param string $name |
||
113 | * @param mixed $value |
||
114 | * @return mixed |
||
115 | */ |
||
116 | private function __handleSet($name, $value) |
||
122 | |||
123 | /** |
||
124 | * @param Prop $property |
||
125 | * @return static |
||
126 | * @throws \Exception |
||
127 | */ |
||
128 | final protected function _prop(Prop $property) |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | final public function _generatePhpDoc() |
||
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | private function __getNamespace() |
||
176 | |||
177 | abstract protected function _initProps(); |
||
178 | } |
||
179 |