diff options
author | Joas Schilling <coding@schilljs.com> | 2019-03-05 17:55:35 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-03-05 17:55:35 +0100 |
commit | c5ab74348c01593e3f0c3a05701b224b019ecd87 (patch) | |
tree | 8c960cbbcd6edf4bf675461fdef19438a19cd009 /lib/private/ServerContainer.php | |
parent | a4b34abe45ec407524f2c12beec9af6eaa103afe (diff) | |
download | nextcloud-server-c5ab74348c01593e3f0c3a05701b224b019ecd87.tar.gz nextcloud-server-c5ab74348c01593e3f0c3a05701b224b019ecd87.zip |
Avoid duplicate App container creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/ServerContainer.php')
-rw-r--r-- | lib/private/ServerContainer.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index e1447d2f06b..4c8107fe1be 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -72,6 +72,19 @@ class ServerContainer extends SimpleContainer { } /** + * @param string $appName + * @return DIContainer + * @throws QueryException + */ + public function getRegisteredAppContainer(string $appName) { + if (isset($this->appContainers[strtolower(App::buildAppNamespace($appName, ''))])) { + return $this->appContainers[strtolower(App::buildAppNamespace($appName, ''))]; + } + + throw new QueryException(); + } + + /** * @param string $namespace * @param string $sensitiveNamespace * @return DIContainer |