class DefinitionDecorator extends Definition
This definition decorates another definition.
__construct(string $parent) | ||
$this | setFactory($callable) Sets a factory. | |
string|array | getFactory() Gets the factory. | from Definition |
$this | setDecoratedService(null|string $id, null|string $renamedId = null, int $priority) Sets the service that this service is decorating. | |
null|array | getDecoratedService() Gets the service that decorates this service. | from Definition |
$this | setClass(string $class) Sets the service class. | |
string|null | getClass() Gets the service class. | from Definition |
$this | setArguments(array $arguments) Sets the arguments to pass to the service constructor/factory method. | from Definition |
setProperties(array $properties) | from Definition | |
getProperties() | from Definition | |
setProperty($name, $value) | from Definition | |
$this | addArgument(mixed $argument) Adds an argument to pass to the service constructor/factory method. | from Definition |
$this | replaceArgument(int $index, mixed $value) You should always use this method when overwriting existing arguments of the parent definition. | |
array | getArguments() Gets the arguments to pass to the service constructor/factory method. | from Definition |
mixed | getArgument(int $index) Gets an argument to pass to the service constructor/factory method. | |
$this | setMethodCalls(array $calls = array()) Sets the methods to call after service initialization. | from Definition |
$this | addMethodCall(string $method, array $arguments = array()) Adds a method to call after service initialization. | from Definition |
$this | removeMethodCall(string $method) Removes a method to call after service initialization. | from Definition |
bool | hasMethodCall(string $method) Check if the current definition has a given method to call after service initialization. | from Definition |
array | getMethodCalls() Gets the methods to call after service initialization. | from Definition |
$this | setTags(array $tags) Sets tags for this definition. | from Definition |
array | getTags() Returns all tags. | from Definition |
array | getTag(string $name) Gets a tag by name. | from Definition |
$this | addTag(string $name, array $attributes = array()) Adds a tag for this definition. | from Definition |
bool | hasTag(string $name) Whether this definition has a tag with the given name. | from Definition |
$this | clearTag(string $name) Clears all tags for a given name. | from Definition |
$this | clearTags() Clears the tags for this definition. | from Definition |
$this | setFile(string $file) Sets a file to require before creating the service. | |
string|null | getFile() Gets the file to require before creating the service. | from Definition |
Definition | setShared(bool $shared) Sets if the service must be shared or not. | from Definition |
bool | isShared() Whether this service is shared. | from Definition |
$this | setPublic(bool $boolean) Sets the visibility of this service. | |
bool | isPublic() Whether this service is public facing. | from Definition |
$this | setLazy($boolean) Sets the lazy flag of this service. | |
bool | isLazy() Whether this service is lazy. | from Definition |
$this | setSynthetic(bool $boolean) Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected. | from Definition |
bool | isSynthetic() Whether this definition is synthetic, that is not constructed by the container, but dynamically injected. | from Definition |
$this | setAbstract(bool $boolean) Whether this definition is abstract, that means it merely serves as a template for other definitions. | from Definition |
bool | isAbstract() Whether this definition is abstract, that means it merely serves as a template for other definitions. | from Definition |
Definition | setDeprecated($boolean = true, string $template = null) Whether this definition is deprecated, that means it should not be called anymore. | |
bool | isDeprecated() Whether this definition is deprecated, that means it should not be called anymore. | from Definition |
string | getDeprecationMessage(string $id) Message to use if this definition is deprecated. | from Definition |
$this | setConfigurator($callable) Sets a configurator to call after the service is fully initialized. | |
callable|null | getConfigurator() Gets the configurator to call after the service is fully initialized. | from Definition |
Definition | setAutowiringTypes(array $types) Sets types that will default to this definition. | from Definition |
bool | isAutowired() Is the definition autowired? | from Definition |
Definition | setAutowired(bool $autowired) Sets autowired. | |
string[] | getAutowiringTypes() Gets autowiring types that will default to this definition. | from Definition |
Definition | addAutowiringType(string $type) Adds a type that will default to this definition. | from Definition |
Definition | removeAutowiringType(string $type) Removes a type. | from Definition |
bool | hasAutowiringType(string $type) Will this definition default for the given type? | from Definition |
string | getParent() Returns the Definition being decorated. | |
array | getChanges() Returns all changes tracked for the Definition object. |
Sets a factory.
Gets the factory.
Sets the service that this service is decorating.
Gets the service that decorates this service.
Sets the service class.
Gets the service class.
Sets the arguments to pass to the service constructor/factory method.
Adds an argument to pass to the service constructor/factory method.
You should always use this method when overwriting existing arguments of the parent definition.
If you directly call setArguments() keep in mind that you must follow certain conventions when you want to overwrite the arguments of the parent definition, otherwise your arguments will only be appended.
Gets the arguments to pass to the service constructor/factory method.
Gets an argument to pass to the service constructor/factory method.
If replaceArgument() has been used to replace an argument, this method will return the replacement value.
Sets the methods to call after service initialization.
Adds a method to call after service initialization.
Removes a method to call after service initialization.
Check if the current definition has a given method to call after service initialization.
Gets the methods to call after service initialization.
Sets tags for this definition.
Returns all tags.
Gets a tag by name.
Adds a tag for this definition.
Whether this definition has a tag with the given name.
Clears all tags for a given name.
Clears the tags for this definition.
Sets a file to require before creating the service.
Gets the file to require before creating the service.
Sets if the service must be shared or not.
Whether this service is shared.
Sets the visibility of this service.
Whether this service is public facing.
Sets the lazy flag of this service.
Whether this service is lazy.
Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
Whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
Whether this definition is abstract, that means it merely serves as a template for other definitions.
Whether this definition is abstract, that means it merely serves as a template for other definitions.
Whether this definition is deprecated, that means it should not be called anymore.
Whether this definition is deprecated, that means it should not be called anymore.
Message to use if this definition is deprecated.
Sets a configurator to call after the service is fully initialized.
Gets the configurator to call after the service is fully initialized.
Sets types that will default to this definition.
Is the definition autowired?
Sets autowired.
Gets autowiring types that will default to this definition.
Adds a type that will default to this definition.
Removes a type.
Will this definition default for the given type?
Returns the Definition being decorated.
Returns all changes tracked for the Definition object.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/DependencyInjection/DefinitionDecorator.html