1 | <?php |
||
17 | class Declaration |
||
18 | { |
||
19 | /** |
||
20 | * @var array|string[] |
||
21 | */ |
||
22 | private $types = []; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $field; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $access; |
||
33 | |||
34 | /** |
||
35 | * Declaration constructor. |
||
36 | * @param string $types |
||
37 | * @param string $field |
||
38 | * @param string $accessType |
||
39 | */ |
||
40 | public function __construct($types, $field, $accessType = Parser::ACCESS_BOTH) |
||
46 | |||
47 | /** |
||
48 | * @return array|string[] |
||
49 | */ |
||
50 | public function getAvailableTypesArray() |
||
54 | |||
55 | /** |
||
56 | * @param string $type |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function typeOf($type) |
||
75 | |||
76 | /** |
||
77 | * @param $type |
||
78 | * @return bool |
||
79 | */ |
||
80 | private function inTypesArray($type) |
||
84 | |||
85 | /** |
||
86 | * @param $typeName |
||
87 | * @return array |
||
88 | */ |
||
89 | private function getVarTypeAliases($typeName) |
||
113 | |||
114 | /** |
||
115 | * @param string $type |
||
116 | * @return bool |
||
117 | */ |
||
118 | private function classOf($type) |
||
128 | |||
129 | /** |
||
130 | * @return bool |
||
131 | */ |
||
132 | public function isReadable() |
||
136 | |||
137 | /** |
||
138 | * @return bool |
||
139 | */ |
||
140 | public function isWritable() |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getName() |
||
152 | } |
||
153 |