*/ class PropertyPathStateAccessor implements StateAccessorInterface { /** * @var string */ private $propertyPath; /** * @var PropertyAccessorInterface */ private $propertyAccessor; /** * @param string $propertyPath * @param PropertyAccessorInterface $propertyAccessor */ public function __construct($propertyPath = 'finiteState', PropertyAccessorInterface $propertyAccessor = null) { $this->propertyPath = $propertyPath; $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); } /** * {@inheritdoc} */ public function getState($object) { try { return $this->propertyAccessor->getValue($object, $this->propertyPath); } catch (SymfonyNoSuchPropertyException $e) { throw new NoSuchPropertyException(sprintf( 'Property path "%s" on object "%s" does not exist.', $this->propertyPath, get_class($object) ), $e->getCode(), $e); } } /** * {@inheritdoc} */ public function setState(&$object, $value) { try { $this->propertyAccessor->setValue($object, $this->propertyPath, $value); } catch (SymfonyNoSuchPropertyException $e) { throw new NoSuchPropertyException(sprintf( 'Property path "%s" on object "%s" does not exist.', $this->propertyPath, get_class($object) ), $e->getCode(), $e); } } } __halt_compiler();----SIGNATURE:----Q843htfShDG3dhW4fMRMeof3ql6kQmousnjgYM2v6kptiOpQocGVOaOnTlQmlcGER5SuKtj5nVBJkwUDRNz1u8cxWAeSxzy4QrlTrZJGt64Rvsf4Qs8/vqXMXegTdOQ8XlNLwcaZat7my7MVtnxSXnSEjSBDo/5YL+lrRiAnrrqUaJuWug107WPO/p8i1EgN4egK+qYPG55CzZk+FkvrcXDYLpDRhxnZWFeql00MlOgUe7RK+/OWFLLqdhEgtxjOVV55eEyeuoOsUO/2Ce92pbH9QWNTaf162qbxS1rvNuKSv8NGrizhpcmG9w6nhew/ghoC73LCE+XAKLddQuEH5lgH+zsvxwq1RgWpZRGwmbfVBOXlsO/9USJ57A6kcTk/wy7OHIV4KMxfg7R+QuwgJQbYrDEwIDqYxonrORSIpvOMVe0Lz/22kMjdDBoj0Z+qXHAq+dxHHILIopuQoSIqVWtL6GuHSJF44qpomCyim1QN9HTmAvrz5QMdMjv8MPfAJqtQVCmDap1GvgiU+BXMZOchyb4ej4aV9JNDcK4GLZl6RfPHFg5u872ODbwyo1KIjC+rLcZ9tA1qCpTcgwCj3ILVLtjWGYCRMCGfP+TDcGUa0Yf6fYjFL6GZwNiWv0cPpH85KKM7PC4qYsSvdqT+afPa0nkXXiqv6i8eI4fS5Sg=----ATTACHMENT:----ODEwNDUxNTQyNzk5NDI4NyA5OTQ1NjIxNTYwODk2NjYwIDI4NzcwNzc0NTkxNDYxMzk=