ChildDefinition
class ChildDefinition extends Definition
This definition extends another definition.
Properties
protected | $arguments | from Definition | |
$innerServiceId | from Definition |
Methods
No description
Sets the tracked changes for the Definition object.
Sets the service that this service is decorating.
Sets the arguments to pass to the service constructor/factory method.
Sets the properties to define when creating the service.
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.
Gets the arguments to pass to the service constructor/factory method.
Gets an argument to pass to the service constructor/factory method.
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.
No description
Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
No description
Adds a tag for this definition.
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.
Add an error that occurred when building this Definition.
Returns the Definition to inherit from.
Sets the Definition to inherit from.
Details
$this
setDecoratedService(string|null $id, string|null $renamedId = null, int $priority = 0)
Sets the service that this service is decorating.
$this
setArguments(array $arguments)
Sets the arguments to pass to the service constructor/factory method.
$this
addArgument(mixed $argument)
Adds an argument to pass to the service constructor/factory method.
$this
replaceArgument(int|string $index, mixed $value)
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.
mixed
getArgument(int|string $index)
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.
$this
addMethodCall(string $method, array $arguments = array())
Adds a method to call after service initialization.
bool
hasMethodCall(string $method)
Check if the current definition has a given method to call after service initialization.
ChildDefinition[]
getInstanceofConditionals()
Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
$this
setPrivate(bool $boolean)
Sets if this service is private.
When set, the "private" state has a higher precedence than "public". In version 3.4, a "private" service always remains publicly accessible, but triggers a deprecation notice when accessed from the container, so that the service can be made really private in 4.0.
$this
setSynthetic(bool $boolean)
Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
bool
isSynthetic()
Whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
$this
setAbstract(bool $boolean)
Whether this definition is abstract, that means it merely serves as a template for other definitions.
bool
isAbstract()
Whether this definition is abstract, that means it merely serves as a template for other definitions.
$this
setDeprecated(bool $status = 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.
$this
setConfigurator(string|array $configurator)
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.