@@ 171-183 (lines=13) @@ | ||
168 | * |
|
169 | * @return array map of storage id to storage config |
|
170 | */ |
|
171 | public function getStorageForAllUsers() { |
|
172 | $mounts = $this->dbConfig->getAllMounts(); |
|
173 | $configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts); |
|
174 | $configs = array_filter($configs, function ($config) { |
|
175 | return $config instanceof StorageConfig; |
|
176 | }); |
|
177 | ||
178 | $keys = array_map(function (StorageConfig $config) { |
|
179 | return $config->getId(); |
|
180 | }, $configs); |
|
181 | ||
182 | return array_combine($keys, $configs); |
|
183 | } |
|
184 | } |
|
185 |
@@ 123-135 (lines=13) @@ | ||
120 | * |
|
121 | * @return array map of storage id to storage config |
|
122 | */ |
|
123 | protected function readConfig() { |
|
124 | $mounts = $this->readDBConfig(); |
|
125 | $configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts); |
|
126 | $configs = array_filter($configs, function ($config) { |
|
127 | return $config instanceof StorageConfig; |
|
128 | }); |
|
129 | ||
130 | $keys = array_map(function (StorageConfig $config) { |
|
131 | return $config->getId(); |
|
132 | }, $configs); |
|
133 | ||
134 | return array_combine($keys, $configs); |
|
135 | } |
|
136 | ||
137 | /** |
|
138 | * Get a storage with status |