Definition
class Definition
Definition represents a service definition.
Methods
Constructor.
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.
No description
No description
No description
Adds an argument to pass to the service constructor/factory method.
Sets a specific argument.
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.
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?
Details
at line line 50
__construct(string|null $class = null, array $arguments = array())
Constructor.
at line line 63
Definition
setFactory(string|array $factory)
Sets a factory.
at line line 79
string|array
getFactory()
Gets the factory.
at line line 95
Definition
setDecoratedService(null|string $id, null|string $renamedId = null, int $priority)
Sets the service that this service is decorating.
at line line 115
null|array
getDecoratedService()
Gets the service that decorates this service.
at line line 127
Definition
setClass(string $class)
Sets the service class.
at line line 139
string|null
getClass()
Gets the service class.
at line line 151
Definition
setArguments(array $arguments)
Sets the arguments to pass to the service constructor/factory method.
at line line 158
setProperties(array $properties)
at line line 165
getProperties()
at line line 170
setProperty($name, $value)
at line line 184
Definition
addArgument(mixed $argument)
Adds an argument to pass to the service constructor/factory method.
at line line 201
Definition
replaceArgument(int $index, mixed $argument)
Sets a specific argument.
at line line 217
array
getArguments()
Gets the arguments to pass to the service constructor/factory method.
at line line 231
mixed
getArgument(int $index)
Gets an argument to pass to the service constructor/factory method.
at line line 247
Definition
setMethodCalls(array $calls = array())
Sets the methods to call after service initialization.
at line line 267
Definition
addMethodCall(string $method, array $arguments = array())
Adds a method to call after service initialization.
at line line 284
Definition
removeMethodCall(string $method)
Removes a method to call after service initialization.
at line line 303
bool
hasMethodCall(string $method)
Check if the current definition has a given method to call after service initialization.
at line line 319
array
getMethodCalls()
Gets the methods to call after service initialization.
at line line 331
Definition
setTags(array $tags)
Sets tags for this definition.
at line line 343
array
getTags()
Returns all tags.
at line line 355
array
getTag(string $name)
Gets a tag by name.
at line line 368
Definition
addTag(string $name, array $attributes = array())
Adds a tag for this definition.
at line line 382
bool
hasTag(string $name)
Whether this definition has a tag with the given name.
at line line 394
Definition
clearTag(string $name)
Clears all tags for a given name.
at line line 406
Definition
clearTags()
Clears the tags for this definition.
at line line 420
Definition
setFile(string $file)
Sets a file to require before creating the service.
at line line 432
string|null
getFile()
Gets the file to require before creating the service.
at line line 444
Definition
setShared(bool $shared)
Sets if the service must be shared or not.
at line line 456
bool
isShared()
Whether this service is shared.
at line line 468
Definition
setPublic(bool $boolean)
Sets the visibility of this service.
at line line 480
bool
isPublic()
Whether this service is public facing.
at line line 492
Definition
setLazy(bool $lazy)
Sets the lazy flag of this service.
at line line 504
bool
isLazy()
Whether this service is lazy.
at line line 517
Definition
setSynthetic(bool $boolean)
Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
at line line 530
bool
isSynthetic()
Whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
at line line 543
Definition
setAbstract(bool $boolean)
Whether this definition is abstract, that means it merely serves as a template for other definitions.
at line line 556
bool
isAbstract()
Whether this definition is abstract, that means it merely serves as a template for other definitions.
at line line 572
Definition
setDeprecated(bool $status = true, string $template = null)
Whether this definition is deprecated, that means it should not be called anymore.
at line line 597
bool
isDeprecated()
Whether this definition is deprecated, that means it should not be called anymore.
at line line 609
string
getDeprecationMessage(string $id)
Message to use if this definition is deprecated.
at line line 621
Definition
setConfigurator(callable $callable)
Sets a configurator to call after the service is fully initialized.
at line line 633
callable|null
getConfigurator()
Gets the configurator to call after the service is fully initialized.
at line line 645
Definition
setAutowiringTypes(array $types)
Sets types that will default to this definition.
at line line 661
bool
isAutowired()
Is the definition autowired?
at line line 673
Definition
setAutowired($autowired)
Sets autowired.
at line line 685
string[]
getAutowiringTypes()
Gets autowiring types that will default to this definition.
at line line 697
Definition
addAutowiringType(string $type)
Adds a type that will default to this definition.
at line line 711
Definition
removeAutowiringType(string $type)
Removes a type.
at line line 725
bool
hasAutowiringType(string $type)
Will this definition default for the given type?