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("NONE")
11 * @Serializer\AccessorOrder("custom",custom = {"name", "gender", "age"})
12 */
13class PersonSecretVirtual
14{
15    /**
16     * @Serializer\Type("string")
17     */
18    public $name;
19
20    /**
21     * @Serializer\Exclude()
22     */
23    public $gender;
24
25    /**
26     * @Serializer\Type("string")
27     * @Serializer\Expose(if="show_data('age')")
28     */
29    public $age;
30
31    /**
32     * @Serializer\VirtualProperty()
33     * @Serializer\Type("string")
34     * @Serializer\Exclude(if="show_data('gender')")
35     */
36    public function getGender()
37    {
38        return $this->gender;
39    }
40}
41