aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/ServerContainer.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-03-05 17:55:35 +0100
committerJoas Schilling <coding@schilljs.com>2019-03-05 17:55:35 +0100
commitc5ab74348c01593e3f0c3a05701b224b019ecd87 (patch)
tree8c960cbbcd6edf4bf675461fdef19438a19cd009 /lib/private/ServerContainer.php
parenta4b34abe45ec407524f2c12beec9af6eaa103afe (diff)
downloadnextcloud-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.php13
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