OptimizedPhpArrayDumper::getAliases

protected OptimizedPhpArrayDumper::getAliases()

Gets the aliases as a PHP array.

Return value

array The aliases.

File

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

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;
}
doc_Drupal
2016-10-29 09:32:36
Comments
Leave a Comment

Please login to continue.