diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-05-30 14:20:15 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-06-04 15:13:32 +0200 |
commit | 357263a70bf56e351e0d292c6144f998dad7f079 (patch) | |
tree | 5bdf1458172cbefad7ccd90c173040d8965c6b6b /lib/public | |
parent | 05058b0135813c4bfc355486e04e2324e2244078 (diff) | |
download | nextcloud-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/public')
-rw-r--r-- | lib/public/IContainer.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php index f7ca0697671..558c72291c5 100644 --- a/lib/public/IContainer.php +++ b/lib/public/IContainer.php @@ -61,11 +61,12 @@ interface IContainer { * Look up a service for a given name in the container. * * @param string $name + * @param bool $autoload Should we try to autoload the service. If we are trying to resolve built in types this makes no sense for example * @return mixed * @throws QueryException if the query could not be resolved * @since 6.0.0 */ - public function query($name); + public function query(string $name, bool $autoload = true); /** * A value is stored in the container with it's corresponding name |