SimpleContainer¶
-
class
OC\AppFramework\Utility\
SimpleContainer
¶ - SimpleContainer is a simple implementation of a container on basis of Pimple
Source: lib/private/AppFramework/Utility/SimpleContainer.php#46 Implements: ArrayAccess
Psr\Container\ContainerInterface
OCP\IContainer
Properties¶
Methods¶
-
public
OC\AppFramework\Utility\SimpleContainer::
__construct
()¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#51
-
public
OC\AppFramework\Utility\SimpleContainer::
get
($id)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#55
-
public
OC\AppFramework\Utility\SimpleContainer::
has
($id)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#59
-
public
OC\AppFramework\Utility\SimpleContainer::
resolve
($name)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#109
-
public
OC\AppFramework\Utility\SimpleContainer::
query
($name, $autoload=true)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#124
-
public
OC\AppFramework\Utility\SimpleContainer::
registerParameter
($name, $value)¶ Source: Parameters: - $name (string)
- $value (mixed)
-
public
OC\AppFramework\Utility\SimpleContainer::
registerService
($name, $closure, $shared=true)¶ - The given closure is call the first time the given service is queried.The closure has to return the instance for the given service.Created instance will be cached in case $shared is true.
Source: Parameters: - $name (string) name of the service to register another backend for
- $closure (
Closure
) the closure to be called on service creation - $shared (bool)
-
public
OC\AppFramework\Utility\SimpleContainer::
registerAlias
($alias, $target)¶ - Shortcut for returning a service from a service under a different key,e.g. to tell the container to return a class when queried for aninterface
Source: Parameters: - $alias (string) the alias that should be registered
- $target (string) the target that should be resolved instead
-
protected
OC\AppFramework\Utility\SimpleContainer::
sanitizeName
($name)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#190
-
public
OC\AppFramework\Utility\SimpleContainer::
offsetExists
($id)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#200 Deprecated: 20.0.0 use \Psr\Container\ContainerInterface::has
-
public
OC\AppFramework\Utility\SimpleContainer::
offsetGet
($id)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#207 Deprecated: 20.0.0 use \Psr\Container\ContainerInterface::get
-
public
OC\AppFramework\Utility\SimpleContainer::
offsetSet
($id, $service)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#214 Deprecated: 20.0.0 use \OCP\IContainer::registerService
-
public
OC\AppFramework\Utility\SimpleContainer::
offsetUnset
($offset)¶ Source: lib/private/AppFramework/Utility/SimpleContainer.php#221 Deprecated: 20.0.0