*/ 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:----E8YAZswlOLKlxb9xpXS4cjLIgJDuTytCAVOfvS3RYpDLUoJpJcuJUyIZuUya4eWu15GXgsIlrsjri95HEmMXM2cNWrWDykZm83jKx8PErHitbGoPoRZCdllhV+0SIvwmeL6nKpCBhpIGnLaPlmTwGEzTmIa9EAKxdImK3RQ94odws/YvH6aZ8OKVoWex9faiQ/fjLGnYc0yUpksTleDwbFAHrc1su5rBo8VVtyqupUFC5sQMUIdg3BXmUg9zmUi4hATl0ilvOV5roGd2YDQ3aqDdmyF7OeXCwU68V2k3e0SabBegiuvWdLe3kvYucwSOKz4GJvs1h/dJLSDRxaGLwLDA2ABDkGpfOTTwAO7n+kQ0Bhv001yZreTelU6QaX/F7OY6Jn69iA2VEfkV0ETKU1ZGVqaohb+eCzW5B+RnwW6JgqR0etLgOIYAl5Uupk/WhOdlzSansCAz0Xa7mu2lJjNZl2DAu/g/FKKx5NQeFV4Za/Zh9I4lE89aEqVgPgvXfMCPTJZj/OsicOIL/GecIkGRg7VdhtALmzu/U3UOGWr4RZHPvZ+uS5qDJr1zqYM1lE7msj+o832eVTZOL5kf20x2NATktfXImGwhx7BaM94QhhSxC6dUVbhZo0+1tWn1FZDlaODgokgMfdPG2zaIqK/Nvr5zHihYNG2PZ4BaK54=----ATTACHMENT:----OTYxMDAyNzEzNjkxMDQ3MyA4NDA5OTk1NTIyMjE2MjI3IDY5NzcwNTE1NTgzMzk1NDk=