1 | <?php |
||
21 | abstract class Property implements \ArrayAccess |
||
22 | { |
||
23 | /** |
||
24 | * @var Parser |
||
25 | */ |
||
26 | protected $parser; |
||
27 | |||
28 | /** |
||
29 | * @var int|null |
||
30 | */ |
||
31 | protected $pos; |
||
32 | |||
33 | /** |
||
34 | * @var mixed |
||
35 | */ |
||
36 | protected $value1; |
||
37 | |||
38 | /** |
||
39 | * @var mixed |
||
40 | */ |
||
41 | protected $value2; |
||
42 | |||
43 | /** |
||
44 | * @var mixed |
||
45 | */ |
||
46 | protected $value3; |
||
47 | |||
48 | /** |
||
49 | * Property constructor. |
||
50 | * |
||
51 | * @param int|null $pos |
||
52 | * @param mixed $value1 |
||
53 | */ |
||
54 | public function __construct($pos, $value1) |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getType() |
||
67 | |||
68 | /** |
||
69 | * @return int|null |
||
70 | */ |
||
71 | public function getPos() |
||
75 | |||
76 | /** |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function hasPos() |
||
83 | |||
84 | /** |
||
85 | * @return mixed |
||
86 | */ |
||
87 | protected function getValue1() |
||
91 | |||
92 | /** |
||
93 | * @param mixed $value |
||
94 | */ |
||
95 | protected function setValue1($value) |
||
99 | |||
100 | /** |
||
101 | * @return mixed |
||
102 | */ |
||
103 | protected function getValue2() |
||
107 | |||
108 | /** |
||
109 | * @param mixed $value |
||
110 | */ |
||
111 | protected function setValue2($value) |
||
115 | |||
116 | /** |
||
117 | * @return mixed |
||
118 | */ |
||
119 | protected function getValue3() |
||
123 | |||
124 | /** |
||
125 | * @param mixed $value |
||
126 | */ |
||
127 | protected function setValue3($value) |
||
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | */ |
||
135 | public function offsetExists($offset) |
||
139 | |||
140 | /** |
||
141 | * @inheritdoc |
||
142 | */ |
||
143 | public function offsetGet($offset) |
||
147 | |||
148 | /** |
||
149 | * @inheritdoc |
||
150 | */ |
||
151 | public function offsetSet($offset, $value) |
||
155 | |||
156 | /** |
||
157 | * @inheritdoc |
||
158 | */ |
||
159 | public function offsetUnset($offset) |
||
163 | |||
164 | /** |
||
165 | * @param string $type |
||
166 | * @param int|null $pos |
||
167 | * @param mixed $value1 |
||
168 | * @param mixed|null $value2 |
||
169 | * @param mixed|null $value3 |
||
170 | * |
||
171 | * @return self |
||
172 | */ |
||
173 | public static function factory($type, $pos, $value1, $value2 = null, $value3 = null) |
||
192 | |||
193 | /** |
||
194 | * @param array $prop |
||
195 | * @param int|null $pos |
||
196 | * |
||
197 | * @return Property |
||
198 | */ |
||
199 | public static function factoryFromOldFormat(array $prop, $pos = null) |
||
231 | } |
||
232 |