1 | <?php |
||
26 | class SettingsContainer implements SettingsContainerInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var PoolInterface |
||
30 | */ |
||
31 | private $pool; |
||
32 | |||
33 | /** |
||
34 | * Personal settings manager for handling |
||
35 | * selected profiles |
||
36 | * |
||
37 | * @var PersonalSettingsManager |
||
38 | */ |
||
39 | private $manager; |
||
40 | |||
41 | /** |
||
42 | * Elasticsearch manager for building profiders |
||
43 | * @var Manager |
||
44 | */ |
||
45 | private $esManager; |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | private $profiles = []; |
||
51 | |||
52 | /** |
||
53 | * @var SettingsProviderInterface[] |
||
54 | */ |
||
55 | private $providers = []; |
||
56 | |||
57 | /** |
||
58 | * @var array |
||
59 | */ |
||
60 | private $settings = []; |
||
61 | |||
62 | /** |
||
63 | * Constructor. |
||
64 | * |
||
65 | * @param PoolInterface $pool |
||
66 | * @param PersonalSettingsManager $manager |
||
67 | * @param Manager $esManager |
||
68 | */ |
||
69 | public function __construct( |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function addProvider(SettingsProviderInterface $provider) |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | public function get($setting) |
||
128 | |||
129 | /** |
||
130 | * Handles setting change event. |
||
131 | * |
||
132 | * @param SettingChangeEvent $event |
||
133 | */ |
||
134 | public function onSettingChange( |
||
139 | |||
140 | /** |
||
141 | * @return array |
||
142 | */ |
||
143 | public function getProfiles() |
||
147 | |||
148 | /** |
||
149 | * @param array $profiles |
||
150 | */ |
||
151 | public function setProfiles($profiles) |
||
155 | |||
156 | /** |
||
157 | * @param string $profile |
||
158 | */ |
||
159 | public function addProfile($profile) |
||
163 | |||
164 | /** |
||
165 | * Returns settings cache item. |
||
166 | * |
||
167 | * @return ItemInterface |
||
168 | */ |
||
169 | protected function getCache() |
||
173 | |||
174 | /** |
||
175 | * Returns setting value. |
||
176 | * |
||
177 | * @param string $setting |
||
178 | * @param bool $throwException |
||
179 | * |
||
180 | * @return mixed |
||
181 | * |
||
182 | * @throws SettingNotFoundException |
||
183 | */ |
||
184 | protected function getSetting($setting, $throwException = true) |
||
194 | |||
195 | /** |
||
196 | * BuildProvider. |
||
197 | * |
||
198 | * @param string $profile |
||
199 | * |
||
200 | * @return ManagerAwareSettingProvider |
||
201 | */ |
||
202 | private function buildProvider($profile) |
||
209 | } |
||
210 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..