PhpArrayDumper
class PhpArrayDumper extends OptimizedPhpArrayDumper (View source)
PhpArrayDumper dumps a service container as a PHP array.
The format of this dumper is a human-readable serialized PHP array, which is very similar to the YAML based format, but based on PHP arrays instead of YAML strings.
It is human-readable, for a machine-optimized version based on this one see \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper.
Properties
| protected bool | $serialize | Whether to serialize service definitions or not. |
from OptimizedPhpArrayDumper |
| protected array | $aliases | A list of container aliases. |
from OptimizedPhpArrayDumper |
Methods
Gets the service container definition as a PHP array.
Gets services of the container as a PHP array.
Prepares parameters for the PHP array dumping.
Gets a service definition as PHP array.
Dumps a collection to a PHP array.
Dumps callable to a PHP array.
Gets a private service definition in a suitable format.
Gets a service reference for a reference in a suitable PHP array format.
Gets a service reference for an ID in a suitable PHP array format.
Gets a parameter reference in a suitable PHP array format.
Whether this supports the machine-optimized format or not.
Details
dump(array $options = [])
{@inheritdoc}
array
getArray()
Gets the service container definition as a PHP array.
protected array
getAliases()
Gets the aliases as a PHP array.
protected array
getParameters()
Gets parameters of the container as a PHP array.
protected array
getServiceDefinitions()
Gets services of the container as a PHP array.
protected array
prepareParameters(array $parameters, bool $escape = TRUE)
Prepares parameters for the PHP array dumping.
protected array
escape(array $parameters)
Escapes parameters.
protected array
getServiceDefinition(Definition $definition)
Gets a service definition as PHP array.
protected array
dumpMethodCalls(array $calls)
Dumps method calls to a PHP array.
protected object|array
dumpCollection(mixed $collection, bool $resolve = FALSE)
Dumps a collection to a PHP array.
protected callable
dumpCallable(array|callable $callable)
Dumps callable to a PHP array.
protected object
getPrivateServiceCall(string $id, Definition $definition, bool $shared = FALSE)
Gets a private service definition in a suitable format.
protected mixed
dumpValue(mixed $value)
Dumps the value to PHP array format.
protected string|object
getReferenceCall(string $id, Reference $reference = NULL)
Gets a service reference for a reference in a suitable PHP array format.
The main difference is that this function treats references to private services differently and returns a private service reference instead of a normal reference.
protected string|object
getServiceCall(string $id, int $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
Gets a service reference for an ID in a suitable PHP array format.
protected string|object
getParameterCall(string $name)
Gets a parameter reference in a suitable PHP array format.
protected bool
supportsMachineFormat()
Whether this supports the machine-optimized format or not.