Dumps the service container as a PHP class.
Available options:
@api
array $options An array of options:
string A PHP class representing of the service container
Overrides DumperInterface::dump
public function dump(array $options = array()) {
$options = array_merge(array(
'class' => 'ProjectServiceContainer',
'base_class' => 'Container',
), $options);
$code = $this
->startClass($options['class'], $options['base_class']);
if ($this->container
->isFrozen()) {
$code .= $this
->addFrozenConstructor();
}
else {
$code .= $this
->addConstructor();
}
$code .= $this
->addServices() . $this
->addDefaultParametersMethod() . $this
->endClass();
return $code;
}