PhpArrayContainer

Provides a container optimized for Drupal's needs.

This container implementation is compatible with the default Symfony dependency injection container and similar to the Symfony ContainerBuilder class, but optimized for speed.

It is based on a human-readable PHP array container definition with a structure very similar to the YAML container definition.

Hierarchy

  • class \Drupal\Component\DependencyInjection\Container implements IntrospectableContainerInterface, ResettableContainerInterface

See also

\Drupal\Component\DependencyInjection\Container

\Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper

\Drupal\Component\DependencyInjection\DependencySerializationTrait

Related topics

Services and Dependency Injection Container
Overview of the Dependency Injection Container and Services.

File

core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php, line 25

Namespace

Drupal\Component\DependencyInjection

Members

Name Modifiers Type Description
Container::$aliases protected property The aliases of the container.
Container::$frozen protected property Whether the container parameters can still be changed.
Container::$loading protected property The currently loading services.
Container::$parameters protected property The parameters of the container.
Container::$privateServices protected property The instantiated private services.
Container::$serviceDefinitions protected property The service definitions of the container.
Container::$services protected property The instantiated services.
Container::addScope public function
Container::enterScope public function
Container::get public function
Container::getAlternatives protected function Provides alternatives for a given array and key.
Container::getParameter public function
Container::getParameterAlternatives protected function Provides alternatives in case a parameter was not found.
Container::getServiceAlternatives protected function Provides alternatives in case a service was not found.
Container::getServiceIds public function Gets all defined service IDs.
Container::has public function
Container::hasParameter public function
Container::hasScope public function
Container::initialized public function Check for whether or not a service has been initialized. Overrides IntrospectableContainerInterface::initialized
Container::isScopeActive public function
Container::leaveScope public function
Container::reset public function Resets shared services from the container. Overrides ResettableContainerInterface::reset
Container::set public function
Container::setParameter public function
Container::__clone private function Ensure that cloning doesn't work.
PhpArrayContainer::createService protected function Creates a service from a service definition. Overrides Container::createService
PhpArrayContainer::resolveServicesAndParameters protected function Resolves arguments that represent services or variables to the real values. Overrides Container::resolveServicesAndParameters
PhpArrayContainer::__construct public function Constructs a new Container instance. Overrides Container::__construct
doc_Drupal
2016-10-29 09:33:46
Comments
Leave a Comment

Please login to continue.