![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/vendor/jms/serializer/src/Metadata/ |
<?php declare(strict_types=1); namespace JMS\Serializer\Metadata; use JMS\Serializer\Expression\Expression; /** * @Annotation * @Target("METHOD") * * @author Asmir Mustafic <[email protected]> */ #[\Attribute(\Attribute::TARGET_METHOD)] class ExpressionPropertyMetadata extends PropertyMetadata { /** * @var string|Expression */ public $expression; /** * @param string|Expression $expression */ public function __construct(string $class, string $fieldName, $expression) { $this->class = $class; $this->name = $fieldName; $this->expression = $expression; $this->readOnly = true; } public function setAccessor(string $type, ?string $getter = null, ?string $setter = null): void { } /** * {@inheritdoc} */ protected function serializeToArray(): array { return [ $this->expression, parent::serializeToArray(), ]; } protected function unserializeFromArray(array $data): void { [ $this->expression, $parentData, ] = $data; parent::unserializeFromArray($parentData); } }