Symfony\Component\DependencyInjection\Dumper\PhpDumper
PhpDumper dumps a service container as a PHP class.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class PhpDumper
extends Dumper
{
- // constants
- const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz';
- const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_';
- // members
- private $inlinedDefinitions;
- private $definitionVariables;
- private $referenceVariables;
- private $variableCount;
- private array $reservedVariables;
- private DumperInterface $proxyDumper;
- // Inherited members from Dumper
- protected $container;
- // methods
- public void __construct()
- public void setProxyDumper()
- public string dump()
- private DumperInterface getProxyDumper()
- private string addServiceLocalTempVariables()
- private string addProxyClasses()
- private string addServiceInclude()
- private string addServiceInlinedDefinitions()
- private string addServiceReturn()
- private string addServiceInstance()
- private Boolean isSimpleInstance()
- private string addServiceMethodCalls()
- private void addServiceProperties()
- private string addServiceInlinedDefinitionsSetup()
- private string addServiceConfigurator()
- private string addService()
- private string addServices()
- private void addServiceSynchronizer()
- private void addNewInstance()
- private string startClass()
- private string addConstructor()
- private string addFrozenConstructor()
- private string addMethodMap()
- private string addAliases()
- private string addDefaultParametersMethod()
- private string exportParameters()
- private string endClass()
- private string wrapServiceConditionals()
- private void getServiceCallsFromArguments()
- private array getInlinedDefinitions()
- private array getDefinitionsFromArguments()
- private Boolean hasReference()
- private string dumpValue()
- public string dumpParameter()
- private string getServiceCall()
- private string getNextVariableName()
- // Inherited methods from Dumper
- public void __construct()
Hierarchy
Constants
Name | Value |
---|---|
FIRST_CHARS | 'abcdefghijklmnopqrstuvwxyz' |
NON_FIRST_CHARS | 'abcdefghijklmnopqrstuvwxyz0123456789_' |
Members
private
- $definitionVariables
- $inlinedDefinitions
- $proxyDumper — \Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface
- $referenceVariables
- $reservedVariables
- $variableCount
protected
- $container
Methods
private
- addAliases() — Adds the aliases property definition
- addConstructor() — Adds the constructor.
- addDefaultParametersMethod() — Adds default parameters method.
- addFrozenConstructor() — Adds the constructor for a frozen container.
- addMethodMap() — Adds the methodMap property definition
- addNewInstance()
- addProxyClasses() — Generates code for the proxies to be attached after the container class
- addService() — Adds a service
- addServiceConfigurator() — Adds configurator definition
- addServiceInclude() — Generates the require_once statement for service includes.
- addServiceInlinedDefinitions() — Generates the inline definition of a service.
- addServiceInlinedDefinitionsSetup() — Generates the inline definition setup.
- addServiceInstance() — Generates the service instance.
- addServiceLocalTempVariables() — Generates Service local temp variables.
- addServiceMethodCalls() — Adds method calls to a service definition.
- addServiceProperties()
- addServiceReturn() — Adds the service return statement.
- addServiceSynchronizer() — Adds synchronizer methods.
- addServices() — Adds multiple services
- dumpValue() — Dumps values.
- endClass() — Ends the class definition.
- exportParameters() — Exports parameters.
- getDefinitionsFromArguments() — Gets the definition from arguments.
- getInlinedDefinitions() — Returns the inline definition.
- getNextVariableName() — Returns the next name to use
- getProxyDumper() — Retrieves the currently set proxy dumper or instantiates one.
- getServiceCall() — Gets a service call
- getServiceCallsFromArguments() — Builds service calls from arguments.
- hasReference() — Checks if a service id has a reference.
- isSimpleInstance() — Checks if the definition is a simple instance.
- startClass() — Adds the class headers.
- wrapServiceConditionals() — Wraps the service conditionals.
public
- __construct() — {@inheritDoc}
- dump() — Dumps the service container as a PHP class.
- dumpParameter() — Dumps a parameter
- setProxyDumper() — Sets the dumper to be used when dumping proxies in the generated container.