You are here

protected function OptimizedPhpArrayDumper::getAliases in Zircon Profile 8

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

Gets the aliases as a PHP array.

Return value

array The aliases.

1 call to OptimizedPhpArrayDumper::getAliases()
OptimizedPhpArrayDumper::getArray in core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
Gets the service container definition as a PHP array.

File

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

Class

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

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

protected function getAliases() {
  $alias_definitions = array();
  $aliases = $this->container
    ->getAliases();
  foreach ($aliases as $alias => $id) {
    $id = (string) $id;
    while (isset($aliases[$id])) {
      $id = (string) $aliases[$id];
    }
    $alias_definitions[$alias] = $id;
  }
  return $alias_definitions;
}