1 | <?php |
||
10 | class RestRequestParser |
||
11 | { |
||
12 | /** |
||
13 | * @var MetadataFactory |
||
14 | */ |
||
15 | private $ddrRestMetadataFactory; |
||
16 | |||
17 | 4 | public function __construct(MetadataFactory $ddrRestMetadataFactory) |
|
21 | |||
22 | /** |
||
23 | * @param Request $request |
||
24 | * @param string $entityClass |
||
25 | * @param object|null $entity |
||
26 | * |
||
27 | * @return object |
||
28 | */ |
||
29 | 4 | public function parseEntity( |
|
51 | |||
52 | /** |
||
53 | * @param Request $request |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | 4 | protected function getRequestContent(Request $request) |
|
66 | |||
67 | /** |
||
68 | * @param object $object Access by reference. |
||
69 | * @param string $method |
||
70 | * @param array $data |
||
71 | */ |
||
72 | 4 | protected function updateObject( |
|
92 | |||
93 | /** |
||
94 | * @param object $object Access by reference. |
||
95 | * @param string $method |
||
96 | * @param string $propertyName |
||
97 | * @param mixed $value |
||
98 | * @param PropertyMetadata $propertyMetadata |
||
99 | */ |
||
100 | 2 | protected function updateProperty( |
|
127 | |||
128 | // /** |
||
129 | // * @param object $object Access by reference. |
||
130 | // * @param string $method |
||
131 | // * @param string $propertyName |
||
132 | // * @param [] $value |
||
133 | // */ |
||
134 | // protected function updatePropertyObject( |
||
135 | // &$object, |
||
136 | // $method, |
||
137 | // $class, |
||
138 | // $propertyName, |
||
139 | // $value |
||
140 | // ) { |
||
141 | // $propertyObject = $this->propertyAccessor->getValue($object, $propertyName); |
||
142 | // if (null === $propertyObject) { |
||
143 | // $propertyObject = new $class; |
||
144 | // } |
||
145 | // |
||
146 | // $this->updateObject($propertyObject, $method, $value); |
||
147 | // $this->propertyAccessor->setValue($object, $propertyName, $propertyObject); |
||
148 | // } |
||
149 | |||
150 | /** |
||
151 | * @param string $method |
||
152 | * @param PropertyMetadata $propertyMetadata |
||
153 | * |
||
154 | * @return bool |
||
155 | */ |
||
156 | 2 | protected function isUpdateable( |
|
169 | |||
170 | 2 | private function convert(?string $type, $value) |
|
185 | } |
||
186 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.