1<?php 2 3declare(strict_types=1); 4 5namespace JMS\Serializer\Tests\Fixtures; 6 7use JMS\Serializer\Annotation as Serializer; 8 9/** 10 * @Serializer\ExclusionPolicy("ALL") 11 * @Serializer\AccessorOrder("custom",custom = {"name", "gender"}) 12 */ 13class PersonSecretMoreVirtual 14{ 15 /** 16 * @Serializer\Type("string") 17 * @Serializer\Expose() 18 */ 19 public $name; 20 21 public $gender; 22 23 /** 24 * @Serializer\VirtualProperty() 25 * @Serializer\Type("string") 26 * @Serializer\Expose(if="show_data('gender')") 27 */ 28 public function getGender() 29 { 30 return $this->gender; 31 } 32} 33