You are here

public function OptimizedPhpArrayDumper::getArray in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getArray()

Gets the service container definition as a PHP array.

Return value

array A PHP array representation of the service container.

2 calls to OptimizedPhpArrayDumper::getArray()
OptimizedPhpArrayDumper::dump in lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
Dumps the service container.
PhpArrayDumper::getArray in lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php
Gets the service container definition as a PHP array.
1 method overrides OptimizedPhpArrayDumper::getArray()
PhpArrayDumper::getArray in lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php
Gets the service container definition as a PHP array.

File

lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php, line 66
Contains \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper.

Class

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

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

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