Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function execute() |
||
20 | { |
||
21 | /** @var \ReflectionClass $reflection */ |
||
22 | $reflection = $this->getFromResponse('reflection'); |
||
23 | $persistedEntity = $this->getFromResponse('response_data'); |
||
24 | |||
25 | $data = []; |
||
26 | |||
27 | foreach ($reflection->getProperties() as $property) { |
||
28 | if ($this->accessManager->canAccessProperty($property)) { |
||
29 | $data[$property->getName()] = call_user_func([$persistedEntity, 'get'.ucfirst($property->getName())]); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | return $this->createResponse(['response_data' => $data]); |
||
34 | } |
||
40 | } |