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) |
||
131 | |||
132 | /** |
||
133 | * Handles setting change event. |
||
134 | * |
||
135 | * @param SettingChangeEvent $event |
||
136 | */ |
||
137 | public function onSettingChange( |
||
143 | |||
144 | /** |
||
145 | * @return array |
||
146 | */ |
||
147 | public function getProfiles() |
||
151 | |||
152 | /** |
||
153 | * @param array $profiles |
||
154 | */ |
||
155 | public function setProfiles($profiles) |
||
159 | |||
160 | /** |
||
161 | * @param string $profile |
||
162 | */ |
||
163 | public function addProfile($profile) |
||
167 | |||
168 | /** |
||
169 | * Returns settings cache item. |
||
170 | * |
||
171 | * @param string $user |
||
172 | * |
||
173 | * @return ItemInterface |
||
174 | */ |
||
175 | protected function getCache($user) |
||
179 | |||
180 | /** |
||
181 | * Returns setting value. |
||
182 | * |
||
183 | * @param string $setting |
||
184 | * @param bool $throwException |
||
185 | * |
||
186 | * @return mixed |
||
187 | * |
||
188 | * @throws SettingNotFoundException |
||
189 | */ |
||
190 | protected function getSetting($setting, $throwException = true) |
||
200 | |||
201 | /** |
||
202 | * BuildProvider. |
||
203 | * |
||
204 | * @param string $profile |
||
205 | * |
||
206 | * @return ManagerAwareSettingProvider |
||
207 | */ |
||
208 | private function buildProvider($profile) |
||
215 | } |
||
216 |
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..