public PhpArrayContainer::__construct(array $container_definition = array())
Constructs a new Container instance.
array $container_definition: An array containing the following keys:
Overrides Container::__construct
public function __construct(array $container_definition = array()) { if (isset($container_definition['machine_format']) && $container_definition['machine_format'] === TRUE) { throw new InvalidArgumentException('The machine-optimized format is not supported by this class. Use a human-readable format instead, e.g. as produced by \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper.'); } // Do not call the parent's constructor as it would bail on the // machine-optimized format. $this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : array(); $this->parameters = isset($container_definition['parameters']) ? $container_definition['parameters'] : array(); $this->serviceDefinitions = isset($container_definition['services']) ? $container_definition['services'] : array(); $this->frozen = isset($container_definition['frozen']) ? $container_definition['frozen'] : FALSE; // Register the service_container with itself. $this->services['service_container'] = $this; }
© 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/function/PhpArrayContainer::__construct/8.1.x