protected function PhpArrayDumper::getServiceDefinitions in Service Container 7.2
Same name and namespace in other branches
- 7 lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper::getServiceDefinitions()
Returns services of the container as a PHP Array.
Return value
array The service definitions.
1 call to PhpArrayDumper::getServiceDefinitions()
- PhpArrayDumper::getArray in lib/
Drupal/ Core/ DependencyInjection/ Dumper/ PhpArrayDumper.php - Returns the service container as a PHP array.
File
- lib/
Drupal/ Core/ DependencyInjection/ Dumper/ PhpArrayDumper.php, line 68 - Contains \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper
Class
- PhpArrayDumper
- PhpArrayDumper dumps a service container as a serialized PHP array.
Namespace
Drupal\Core\DependencyInjection\DumperCode
protected function getServiceDefinitions() {
if (!$this->container
->getDefinitions()) {
return array();
}
$services = array();
foreach ($this->container
->getDefinitions() as $id => $definition) {
$services[$id] = $this
->getServiceDefinition($definition);
}
$aliases = $this->container
->getAliases();
foreach ($aliases as $alias => $id) {
while (isset($aliases[(string) $id])) {
$id = $aliases[(string) $id];
}
$services[$alias] = $this
->getServiceAliasDefinition($id);
}
return $services;
}