1 | <?php |
||
20 | class Property extends Annotation |
||
21 | { |
||
22 | /** |
||
23 | * Types mapping to allow use of standard type names |
||
24 | * in PHP 7.x where use of reserved words as class names is not allowed |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | private static $typesMap = [ |
||
29 | 'string' => 'str', |
||
30 | 'int' => 'integer', |
||
31 | ]; |
||
32 | /** |
||
33 | * Property type |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | private $type; |
||
38 | /** |
||
39 | * Property configuration |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | private $config = []; |
||
44 | |||
45 | /** |
||
46 | * Get property type |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 181 | public function getType() |
|
54 | |||
55 | /** |
||
56 | * Get property config |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | 179 | public function getConfig() |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 185 | protected function parseValues(array &$values) |
|
85 | |||
86 | /** |
||
87 | * Get default property type |
||
88 | * |
||
89 | * @return string|null |
||
90 | */ |
||
91 | 184 | protected function getDefaultType() |
|
98 | } |
||
99 |