MCPcopy Create free account
hub / github.com/error311/FileRise / getConfig

Method getConfig

src/FileRise/Storage/SourcesConfig.php:270–287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268 }
269
270 public static function getConfig(): array
271 {
272 if (self::proSourcesAvailable()) {
273 return self::withCapabilities(ProSources::getConfig());
274 }
275
276 $cfg = self::coreConfigFromRaw(self::loadRaw());
277 $out = [
278 'enabled' => !empty($cfg['enabled']),
279 'sources' => [],
280 ];
281
282 foreach ($cfg['sources'] as $src) {
283 $out['sources'][] = self::buildSourceView($src, true, false);
284 }
285
286 return self::withCapabilities($out);
287 }
288
289 public static function getPublicConfig(): array
290 {

Callers 5

sourcesEnabledMethod · 0.95
getConfiguredModeMethod · 0.45
purgeUserMethod · 0.45
initMethod · 0.45
listAllSourcesMethod · 0.45

Calls 5

proSourcesAvailableMethod · 0.95
withCapabilitiesMethod · 0.95
coreConfigFromRawMethod · 0.95
loadRawMethod · 0.95
buildSourceViewMethod · 0.95

Tested by

no test coverage detected