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.
\Drupal\Component\DependencyInjection\Container
\Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper
\Drupal\Component\DependencyInjection\DependencySerializationTrait
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 |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!DependencyInjection!PhpArrayContainer.php/class/PhpArrayContainer/8.1.x