1<?php 2 3declare(strict_types=1); 4 5namespace JMS\Serializer\Tests\Fixtures; 6 7use JMS\Serializer\Annotation as Serializer; 8 9/** 10 * @Serializer\VirtualProperty("firstName", exp="object.getFirstName()") 11 * @Serializer\VirtualProperty("direction", exp="context.getDirection()") 12 * @Serializer\VirtualProperty("name", exp="property_metadata.name") 13 */ 14class AuthorExpressionAccessContext 15{ 16 /** 17 * @Serializer\Exclude() 18 */ 19 private $firstName; 20 21 public function __construct($firstName) 22 { 23 $this->firstName = $firstName; 24 } 25 26 public function getFirstName() 27 { 28 return $this->firstName; 29 } 30} 31