1 | <?php |
||
20 | class ObjectService implements SingletonInterface |
||
21 | { |
||
22 | /** |
||
23 | * This function will try to get a given property for a given object. |
||
24 | * |
||
25 | * Its particularity is that if the getter method for this property is used, |
||
26 | * the method may throw an exception that implements the interface |
||
27 | * `SilentExceptionInterface`. In that case, the exception is catch and |
||
28 | * `null` is returned. |
||
29 | * |
||
30 | * This allows more flexibility for the developer, who may still throw |
||
31 | * exceptions in getter methods for implementation concerns, but these |
||
32 | * exceptions wont block Configuration Object API processing. |
||
33 | * |
||
34 | * @see \Romm\ConfigurationObject\Exceptions\SilentExceptionInterface |
||
35 | * @see \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty() |
||
36 | * |
||
37 | * @param object $object |
||
38 | * @param string $property |
||
39 | * @return mixed |
||
40 | * @throws \Exception |
||
41 | */ |
||
42 | public function getObjectProperty($object, $property) |
||
56 | } |
||
57 |