1 | <?php |
||
20 | class PropertyDefinitions implements IteratorAggregate { |
||
21 | |||
22 | /** |
||
23 | * @var LabelFetcher |
||
24 | */ |
||
25 | private $labelFetcher; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $propertyDefinitionFile; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $labelCacheVersion = 0; |
||
|
|||
36 | |||
37 | /** |
||
38 | * @var array|null |
||
39 | */ |
||
40 | private $propertyDefinitions; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | private $localPropertyDefinitions = array(); |
||
46 | |||
47 | /** |
||
48 | * @since 2.0 |
||
49 | * |
||
50 | * @param LabelFetcher $labelFetcher |
||
51 | * @param string $propertyDefinitionFile |
||
52 | */ |
||
53 | 8 | public function __construct( LabelFetcher $labelFetcher, $propertyDefinitionFile = '' ) { |
|
61 | |||
62 | /** |
||
63 | * @since 2.0 |
||
64 | * |
||
65 | * @param array $localPropertyDefinitions |
||
66 | */ |
||
67 | 1 | public function setLocalPropertyDefinitions( array $localPropertyDefinitions ) { |
|
70 | |||
71 | /** |
||
72 | * @since 2.0 |
||
73 | * |
||
74 | * @param array $propertyDefinitions |
||
75 | */ |
||
76 | 3 | public function setPropertyDefinitions( array $propertyDefinitions ) { |
|
79 | |||
80 | /** |
||
81 | * @since 2.0 |
||
82 | * |
||
83 | * @param string $key |
||
84 | * |
||
85 | * @return boolean |
||
86 | */ |
||
87 | 1 | public function isLocalDef( $key ) { |
|
90 | |||
91 | /** |
||
92 | * @since 2.0 |
||
93 | * |
||
94 | * @param string $key |
||
95 | * |
||
96 | * @return boolean |
||
97 | */ |
||
98 | 2 | public function has( $key ) { |
|
101 | |||
102 | /** |
||
103 | * @since 2.3 |
||
104 | * |
||
105 | * @param string $key |
||
106 | * |
||
107 | * @return string |
||
108 | * @throws InvalidArgumentException |
||
109 | */ |
||
110 | 1 | public function get( $key ) { |
|
118 | |||
119 | /** |
||
120 | * @since 2.0 |
||
121 | * |
||
122 | * @param string $key |
||
123 | * |
||
124 | * @return boolean |
||
125 | */ |
||
126 | 1 | public function deepHas( $key, $key2 ) { |
|
129 | |||
130 | /** |
||
131 | * @since 2.3 |
||
132 | * |
||
133 | * @param string $key |
||
134 | * |
||
135 | * @return string |
||
136 | * @throws InvalidArgumentException |
||
137 | */ |
||
138 | 1 | public function deepGet( $key, $key2 ) { |
|
146 | |||
147 | /** |
||
148 | * @since 3.0 |
||
149 | * |
||
150 | * @param string $key |
||
151 | * @param mixed $default |
||
152 | * |
||
153 | * @return mixed |
||
154 | */ |
||
155 | 1 | public function safeGet( $key, $default = false ) { |
|
158 | |||
159 | /** |
||
160 | * @since 2.0 |
||
161 | * |
||
162 | * @return array |
||
163 | */ |
||
164 | 1 | public function getLabels() { |
|
172 | |||
173 | /** |
||
174 | * @since 2.0 |
||
175 | * |
||
176 | * @param string $key |
||
177 | * |
||
178 | * @return string |
||
179 | */ |
||
180 | 1 | public function getLabel( $key ) { |
|
183 | |||
184 | /** |
||
185 | * @see IteratorAggregate::getIterator |
||
186 | * |
||
187 | * @since 2.0 |
||
188 | * |
||
189 | * @return Iterator |
||
190 | */ |
||
191 | 1 | public function getIterator() { |
|
199 | |||
200 | 2 | private function initPropertyDefinitions() { |
|
217 | |||
218 | } |
||
219 |
This check marks private properties in classes that are never used. Those properties can be removed.