diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-08 20:48:59 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-09 09:19:23 +0100 |
commit | 2e6cab4d82d9651535f1a287afb802072928b9a8 (patch) | |
tree | cf2a6582bf2766e02fd963e57c4f68b6b9da5464 /lib/private/InitialStateService.php | |
parent | 7198bed22d07493f7d5b98e0a0525e8c22b8361f (diff) | |
download | nextcloud-server-2e6cab4d82d9651535f1a287afb802072928b9a8.tar.gz nextcloud-server-2e6cab4d82d9651535f1a287afb802072928b9a8.zip |
Move initialstate bootstrap to proper types classes
For more type safety
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/InitialStateService.php')
-rw-r--r-- | lib/private/InitialStateService.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/InitialStateService.php b/lib/private/InitialStateService.php index 7f9a084ef70..bbab831b915 100644 --- a/lib/private/InitialStateService.php +++ b/lib/private/InitialStateService.php @@ -115,25 +115,25 @@ class InitialStateService implements IInitialStateService { $initialStates = $context->getInitialStates(); foreach ($initialStates as $initialState) { try { - $provider = $this->container->query($initialState['class']); + $provider = $this->container->query($initialState->getService()); } catch (QueryException $e) { // Log an continue. We can be fault tolerant here. $this->logger->logException($e, [ 'message' => 'Could not load initial state provider dynamically: ' . $e->getMessage(), 'level' => ILogger::ERROR, - 'app' => $initialState['appId'], + 'app' => $initialState->getAppId(), ]); continue; } if (!($provider instanceof InitialStateProvider)) { // Log an continue. We can be fault tolerant here. - $this->logger->error('Initial state provider is not an InitialStateProvider instance: ' . $initialState['class'], [ - 'app' => $initialState['appId'], + $this->logger->error('Initial state provider is not an InitialStateProvider instance: ' . $initialState->getService(), [ + 'app' => $initialState->getAppId(), ]); } - $this->provideInitialState($initialState['appId'], $provider->getKey(), $provider); + $this->provideInitialState($initialState->getAppId(), $provider->getKey(), $provider); } } |