1 | <?php |
||
12 | class GenderField extends DataField |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $cast = 'string'; |
||
20 | |||
21 | protected $maleValue = 'male'; |
||
22 | |||
23 | protected $femaleValue = 'female'; |
||
24 | |||
25 | /** |
||
26 | * |
||
27 | * @param array $options |
||
28 | */ |
||
29 | 1 | public function __construct($options=[]) |
|
40 | |||
41 | /** |
||
42 | * (non-PHPdoc) |
||
43 | * |
||
44 | * @see \Solvire\API\Serializers\DataFields\DataField::setData() |
||
45 | */ |
||
46 | 1 | public function setData($data) |
|
61 | |||
62 | /** |
||
63 | * This is a char so it will always be just a string |
||
64 | * |
||
65 | * (non-PHPdoc) |
||
66 | * |
||
67 | * @see \Solvire\API\Serializers\DataFields\DataField::getData() |
||
68 | * @return string |
||
69 | */ |
||
70 | 1 | public function getData() |
|
74 | |||
75 | 1 | public function setMaleValue($male) |
|
79 | |||
80 | 1 | public function setFemaleValue($female) |
|
84 | } |
||
85 |