class Definition
Definition represents a service definition.
Methods
|
__construct(string $class = null, array $arguments = array())
Constructor. |
||
| Definition |
setFactoryClass(string $factoryClass)
Sets the name of the class that acts as a factory using the factory method, which will be invoked statically. |
|
| string |
getFactoryClass()
Gets the factory class. |
|
| Definition |
setFactoryMethod(string $factoryMethod)
Sets the factory method able to create an instance of this class. |
|
| string |
getFactoryMethod()
Gets the factory method. |
|
| Definition |
setFactoryService(string $factoryService)
Sets the name of the service that acts as a factory using the factory method. |
|
| string |
getFactoryService()
Gets the factory service id. |
|
| Definition |
setClass(string $class)
Sets the service class. |
|
| string |
getClass()
Gets the service class. |
|
| Definition |
setArguments(array $arguments)
Sets the arguments to pass to the service constructor/factory method. |
|
| setProperties(array $properties) | ||
| getProperties() | ||
| setProperty($name, $value) | ||
| Definition |
addArgument(mixed $argument)
Adds an argument to pass to the service constructor/factory method. |
|
| Definition |
replaceArgument(integer $index, mixed $argument)
Sets a specific argument |
|
| array |
getArguments()
Gets the arguments to pass to the service constructor/factory method. |
|
| mixed |
getArgument(integer $index)
Gets an argument to pass to the service constructor/factory method. |
|
| Definition |
setMethodCalls(array $calls = array())
Sets the methods to call after service initialization. |
|
| Definition |
addMethodCall(string $method, array $arguments = array())
Adds a method to call after service initialization. |
|
| Definition |
removeMethodCall(string $method)
Removes a method to call after service initialization. |
|
| Boolean |
hasMethodCall(string $method)
Check if the current definition has a given method to call after service initialization. |
|
| array |
getMethodCalls()
Gets the methods to call after service initialization. |
|
| Definition |
setTags(array $tags)
Sets tags for this definition |
|
| array |
getTags()
Returns all tags. |
|
| array |
getTag(string $name)
Gets a tag by name. |
|
| Definition |
addTag(string $name, array $attributes = array())
Adds a tag for this definition. |
|
| Boolean |
hasTag(string $name)
Whether this definition has a tag with the given name |
|
| Definition |
clearTag(string $name)
Clears all tags for a given name. |
|
| Definition |
clearTags()
Clears the tags for this definition. |
|
| Definition |
setFile(string $file)
Sets a file to require before creating the service. |
|
| string |
getFile()
Gets the file to require before creating the service. |
|
| Definition |
setScope(string $scope)
Sets the scope of the service |
|
| string |
getScope()
Returns the scope of the service |
|
| Definition |
setPublic(Boolean $boolean)
Sets the visibility of this service. |
|
| Boolean |
isPublic()
Whether this service is public facing |
|
| Definition |
setSynchronized(Boolean $boolean)
Sets the synchronized flag of this service. |
|
| Boolean |
isSynchronized()
Whether this service is synchronized. |
|
| Definition |
setLazy(Boolean $lazy)
Sets the lazy flag of this service. |
|
| Boolean |
isLazy()
Whether this service is lazy. |
|
| Definition |
setSynthetic(Boolean $boolean)
Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected. |
|
| Boolean |
isSynthetic()
Whether this definition is synthetic, that is not constructed by the container, but dynamically injected. |
|
| Definition |
setAbstract(Boolean $boolean)
Whether this definition is abstract, that means it merely serves as a template for other definitions. |
|
| Boolean |
isAbstract()
Whether this definition is abstract, that means it merely serves as a template for other definitions. |
|
| Definition |
setConfigurator(callable $callable)
Sets a configurator to call after the service is fully initialized. |
|
| callable |
getConfigurator()
Gets the configurator to call after the service is fully initialized. |
Details
at line 52
public
__construct(string $class = null, array $arguments = array())
Constructor.
at line 77
public Definition
setFactoryClass(string $factoryClass)
Sets the name of the class that acts as a factory using the factory method, which will be invoked statically.
at line 91
public string
getFactoryClass()
Gets the factory class.
at line 105
public Definition
setFactoryMethod(string $factoryMethod)
Sets the factory method able to create an instance of this class.
at line 119
public string
getFactoryMethod()
Gets the factory method.
at line 133
public Definition
setFactoryService(string $factoryService)
Sets the name of the service that acts as a factory using the factory method.
at line 147
public string
getFactoryService()
Gets the factory service id.
at line 161
public Definition
setClass(string $class)
Sets the service class.
at line 175
public string
getClass()
Gets the service class.
at line 189
public Definition
setArguments(array $arguments)
Sets the arguments to pass to the service constructor/factory method.
at line 199
public
setProperties(array $properties)
at line 209
public
getProperties()
at line 217
public
setProperty($name, $value)
at line 233
public Definition
addArgument(mixed $argument)
Adds an argument to pass to the service constructor/factory method.
at line 252
public Definition
replaceArgument(integer $index, mixed $argument)
Sets a specific argument
at line 270
public array
getArguments()
Gets the arguments to pass to the service constructor/factory method.
at line 286
public mixed
getArgument(integer $index)
Gets an argument to pass to the service constructor/factory method.
at line 304
public Definition
setMethodCalls(array $calls = array())
Sets the methods to call after service initialization.
at line 326
public Definition
addMethodCall(string $method, array $arguments = array())
Adds a method to call after service initialization.
at line 345
public Definition
removeMethodCall(string $method)
Removes a method to call after service initialization.
at line 366
public Boolean
hasMethodCall(string $method)
Check if the current definition has a given method to call after service initialization.
at line 384
public array
getMethodCalls()
Gets the methods to call after service initialization.
at line 398
public Definition
setTags(array $tags)
Sets tags for this definition
at line 412
public array
getTags()
Returns all tags.
at line 426
public array
getTag(string $name)
Gets a tag by name.
at line 441
public Definition
addTag(string $name, array $attributes = array())
Adds a tag for this definition.
at line 457
public Boolean
hasTag(string $name)
Whether this definition has a tag with the given name
at line 469
public Definition
clearTag(string $name)
Clears all tags for a given name.
at line 485
public Definition
clearTags()
Clears the tags for this definition.
at line 501
public Definition
setFile(string $file)
Sets a file to require before creating the service.
at line 515
public string
getFile()
Gets the file to require before creating the service.
at line 529
public Definition
setScope(string $scope)
Sets the scope of the service
at line 543
public string
getScope()
Returns the scope of the service
at line 557
public Definition
setPublic(Boolean $boolean)
Sets the visibility of this service.
at line 571
public Boolean
isPublic()
Whether this service is public facing
at line 585
public Definition
setSynchronized(Boolean $boolean)
Sets the synchronized flag of this service.
at line 599
public Boolean
isSynchronized()
Whether this service is synchronized.
at line 611
public Definition
setLazy(Boolean $lazy)
Sets the lazy flag of this service.
at line 623
public Boolean
isLazy()
Whether this service is lazy.
at line 638
public Definition
setSynthetic(Boolean $boolean)
Sets whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
at line 653
public Boolean
isSynthetic()
Whether this definition is synthetic, that is not constructed by the container, but dynamically injected.
at line 668
public Definition
setAbstract(Boolean $boolean)
Whether this definition is abstract, that means it merely serves as a template for other definitions.
at line 683
public Boolean
isAbstract()
Whether this definition is abstract, that means it merely serves as a template for other definitions.
at line 697
public Definition
setConfigurator(callable $callable)
Sets a configurator to call after the service is fully initialized.
at line 711
public callable
getConfigurator()
Gets the configurator to call after the service is fully initialized.