aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/ServerContainer.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-05-30 14:20:15 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-06-04 15:13:32 +0200
commit357263a70bf56e351e0d292c6144f998dad7f079 (patch)
tree5bdf1458172cbefad7ccd90c173040d8965c6b6b /lib/private/ServerContainer.php
parent05058b0135813c4bfc355486e04e2324e2244078 (diff)
downloadnextcloud-server-357263a70bf56e351e0d292c6144f998dad7f079.tar.gz
nextcloud-server-357263a70bf56e351e0d292c6144f998dad7f079.zip
Do not try to autoload built in types
This avoids calls to the autoloader (or chain of autoloaders) to see if for example 'principalPrefix' class can be found. While we already know it is a string. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/ServerContainer.php')
-rw-r--r--lib/private/ServerContainer.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php
index 8c2b49bb085..b67b4d1e701 100644
--- a/lib/private/ServerContainer.php
+++ b/lib/private/ServerContainer.php
@@ -113,12 +113,7 @@ class ServerContainer extends SimpleContainer {
throw new QueryException();
}
- /**
- * @param string $name name of the service to query for
- * @return mixed registered service for the given $name
- * @throws QueryException if the query could not be resolved
- */
- public function query($name) {
+ public function query(string $name, bool $autoload = true) {
$name = $this->sanitizeName($name);
if (isset($this[$name])) {
@@ -147,6 +142,6 @@ class ServerContainer extends SimpleContainer {
}
}
- return parent::query($name);
+ return parent::query($name, $autoload);
}
}