1 | <?php |
||
10 | class PropertyMetadata extends BasePropertyMetadata implements MergeableInterface |
||
11 | { |
||
12 | 76 | public function __construct($class, $name) |
|
21 | |||
22 | /** |
||
23 | * @var string|null |
||
24 | */ |
||
25 | private $type; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $puttable; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $excluded; |
||
36 | |||
37 | /** |
||
38 | * @var bool |
||
39 | */ |
||
40 | private $postable; |
||
41 | |||
42 | /** |
||
43 | * @var Right|null |
||
44 | */ |
||
45 | private $postableRight; |
||
46 | |||
47 | /** |
||
48 | * @var Right|null |
||
49 | */ |
||
50 | private $puttableRight; |
||
51 | |||
52 | /** |
||
53 | * @var bool |
||
54 | */ |
||
55 | private $includable; |
||
56 | |||
57 | /** |
||
58 | * @var string[]|null |
||
59 | */ |
||
60 | private $includablePaths; |
||
61 | |||
62 | /** |
||
63 | * @var bool |
||
64 | */ |
||
65 | private $subResource; |
||
66 | |||
67 | /** |
||
68 | * @var Method[]|null |
||
69 | */ |
||
70 | private $methods; |
||
71 | |||
72 | /** |
||
73 | * @var bool |
||
74 | */ |
||
75 | private $association; |
||
76 | |||
77 | /** |
||
78 | * @var bool |
||
79 | */ |
||
80 | private $collection; |
||
81 | |||
82 | /** |
||
83 | * @var bool |
||
84 | */ |
||
85 | private $virtual; |
||
86 | |||
87 | /** |
||
88 | * @var string|null |
||
89 | */ |
||
90 | private $subResourcePath; |
||
91 | |||
92 | 8 | public function isPuttable(): bool |
|
96 | |||
97 | 48 | public function setPuttable(bool $puttable) |
|
101 | |||
102 | 10 | public function isPostable(): bool |
|
106 | |||
107 | 48 | public function setPostable(bool $postable) |
|
111 | |||
112 | 58 | public function isIncludable(): bool |
|
116 | |||
117 | public function isVirtual(): bool |
||
121 | |||
122 | 24 | public function setVirtual(bool $virtual) |
|
126 | |||
127 | 64 | public function setIncludable(bool $includable) |
|
131 | |||
132 | 10 | public function isSubResource(): bool |
|
136 | |||
137 | 62 | public function setSubResource(bool $subResource) |
|
141 | |||
142 | 10 | public function getSubResourcePath(): ?string |
|
146 | |||
147 | public function setSubResourcePath(string $subResourcePath) |
||
151 | |||
152 | 58 | public function isExcluded(): bool |
|
156 | |||
157 | 58 | public function setExcluded(bool $excluded) |
|
161 | |||
162 | /** |
||
163 | * @return null|\string[] |
||
164 | */ |
||
165 | 44 | public function getIncludablePaths(): ?array |
|
169 | |||
170 | /** |
||
171 | * @param null|\string[] $includablePaths |
||
172 | */ |
||
173 | 64 | public function setIncludablePaths(?array $includablePaths) |
|
177 | |||
178 | 58 | public function isAssociation(): bool |
|
182 | |||
183 | 62 | public function setAssociation(bool $association) |
|
187 | |||
188 | 30 | public function isCollection(): bool |
|
192 | |||
193 | 62 | public function setCollection(bool $collection) |
|
197 | |||
198 | 60 | public function getType(): ?string |
|
202 | |||
203 | 76 | public function setType(?string $type) |
|
207 | |||
208 | /** |
||
209 | * @param Method[] $methods |
||
210 | */ |
||
211 | 62 | public function setMethods(array $methods) |
|
215 | |||
216 | 10 | public function getPostableRight(): ?Right |
|
220 | |||
221 | 8 | public function getPuttableRight(): ?Right |
|
225 | |||
226 | 16 | public function setPostableRight(?Right $postableRight) |
|
230 | |||
231 | 16 | public function setPuttableRight(?Right $puttableRight) |
|
235 | |||
236 | 8 | public function merge(MergeableInterface $other) |
|
260 | |||
261 | 62 | protected function getBool(?bool $value, bool $default) |
|
269 | |||
270 | 8 | private function mergeField($thisValue, $otherValue) |
|
278 | |||
279 | 38 | public function getMethod(string $methodName): ?Method |
|
293 | } |
||
294 |