1 | <?php |
||
9 | class PropertyMetadata extends BasePropertyMetadata implements MergeableInterface |
||
10 | { |
||
11 | 34 | public function __construct($class, $name) |
|
20 | |||
21 | /** |
||
22 | * @var string|null |
||
23 | */ |
||
24 | private $type; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | private $puttable; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $excluded; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | private $postable; |
||
40 | |||
41 | /** |
||
42 | * @var bool |
||
43 | */ |
||
44 | private $includable; |
||
45 | |||
46 | /** |
||
47 | * @var string[]|null |
||
48 | */ |
||
49 | private $includablePaths; |
||
50 | |||
51 | /** |
||
52 | * @var bool |
||
53 | */ |
||
54 | private $subResource; |
||
55 | |||
56 | /** |
||
57 | * @var Method[]|null |
||
58 | */ |
||
59 | private $methods; |
||
60 | |||
61 | /** |
||
62 | * @var bool |
||
63 | */ |
||
64 | private $association; |
||
65 | |||
66 | /** |
||
67 | * @var bool |
||
68 | */ |
||
69 | private $collection; |
||
70 | |||
71 | /** |
||
72 | * @var string|null |
||
73 | */ |
||
74 | private $subResourcePath; |
||
75 | |||
76 | /** |
||
77 | * @return boolean |
||
78 | */ |
||
79 | 2 | public function isPuttable() |
|
83 | |||
84 | /** |
||
85 | * @param boolean $puttable |
||
86 | */ |
||
87 | 24 | public function setPuttable($puttable) |
|
91 | |||
92 | /** |
||
93 | * @return boolean |
||
94 | */ |
||
95 | public function isPostable() |
||
99 | |||
100 | /** |
||
101 | * @param boolean $postable |
||
102 | */ |
||
103 | public function setPostable($postable) |
||
107 | |||
108 | /** |
||
109 | * @return boolean |
||
110 | */ |
||
111 | 24 | public function isIncludable() |
|
115 | |||
116 | /** |
||
117 | * @param boolean $includable |
||
118 | */ |
||
119 | 32 | public function setIncludable($includable) |
|
123 | |||
124 | /** |
||
125 | * @return boolean |
||
126 | */ |
||
127 | 4 | public function isSubResource() |
|
131 | |||
132 | /** |
||
133 | * @param boolean $subResource |
||
134 | */ |
||
135 | 24 | public function setSubResource($subResource) |
|
139 | |||
140 | /** |
||
141 | * @return null|string |
||
142 | */ |
||
143 | 2 | public function getSubResourcePath() |
|
147 | |||
148 | /** |
||
149 | * @param null|string $subResourcePath |
||
150 | */ |
||
151 | public function setSubResourcePath($subResourcePath) |
||
155 | |||
156 | /** |
||
157 | * @return bool |
||
158 | */ |
||
159 | 24 | public function isExcluded(): bool |
|
163 | |||
164 | /** |
||
165 | * @param bool $excluded |
||
166 | */ |
||
167 | 28 | public function setExcluded(bool $excluded) |
|
171 | |||
172 | /** |
||
173 | * @return null|\string[] |
||
174 | */ |
||
175 | 22 | public function getIncludablePaths(): ?array |
|
179 | |||
180 | /** |
||
181 | * @param null|\string[] $includablePaths |
||
182 | */ |
||
183 | 32 | public function setIncludablePaths(?array $includablePaths) |
|
187 | |||
188 | /** |
||
189 | * @return bool |
||
190 | */ |
||
191 | 24 | public function isAssociation(): bool |
|
195 | |||
196 | /** |
||
197 | * @param bool $association |
||
198 | */ |
||
199 | 28 | public function setAssociation(bool $association) |
|
203 | |||
204 | /** |
||
205 | * @return bool |
||
206 | */ |
||
207 | 4 | public function isCollection(): bool |
|
211 | |||
212 | /** |
||
213 | * @param bool $collection |
||
214 | */ |
||
215 | 28 | public function setCollection(bool $collection) |
|
219 | |||
220 | 24 | public function getType(): ?string |
|
224 | |||
225 | 34 | public function setType(?string $type) |
|
229 | |||
230 | /** |
||
231 | * @param Method[] $methods |
||
232 | */ |
||
233 | 24 | public function setMethods(array $methods) |
|
237 | |||
238 | 4 | public function merge(MergeableInterface $other) |
|
259 | |||
260 | 26 | protected function getBool(?bool $value, bool $default) |
|
268 | |||
269 | 4 | private function mergeField($thisValue, $otherValue) |
|
277 | |||
278 | 12 | public function getMethod(string $methodName): ?Method |
|
292 | } |
||
293 |