W3cubDocs

/Drupal 8

public function OptimizedPhpArrayDumper::getArray

public OptimizedPhpArrayDumper::getArray()

Gets the service container definition as a PHP array.

Return value

array A PHP array representation of the service container.

File

core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php, line 61

Class

OptimizedPhpArrayDumper
OptimizedPhpArrayDumper dumps a service container as a serialized PHP array.

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

public function getArray() {
  $definition = array();
  $this->aliases = $this->getAliases();
  $definition['aliases'] = $this->getAliases();
  $definition['parameters'] = $this->getParameters();
  $definition['services'] = $this->getServiceDefinitions();
  $definition['frozen'] = $this->container->isFrozen();
  $definition['machine_format'] = $this->supportsMachineFormat();
  return $definition;
}

© 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!Dumper!OptimizedPhpArrayDumper.php/function/OptimizedPhpArrayDumper::getArray/8.1.x