Configuration
class Configuration (View source)
Flow Object Configuration
Constants
AUTOWIRING_MODE_OFF |
|
AUTOWIRING_MODE_ON |
|
SCOPE_PROTOTYPE |
|
SCOPE_SINGLETON |
|
SCOPE_SESSION |
|
Properties
protected string | $objectName | Name of the object |
|
protected string | $className | Name of the class the object is based on |
|
protected string | $packageKey | Key of the package the specified object is part of |
|
protected string | $factoryObjectName | If set, specifies the factory object name used to create this object |
|
protected string | $factoryMethodName | Name of the factory method. |
|
protected array | $factoryArguments | Arguments of the factory method |
|
protected string | $scope | ||
protected array | $arguments | Arguments of the constructor detected by reflection |
|
protected array | $properties | Array of properties which are injected into the object |
|
protected int | $autowiring | Mode of the autowiring feature. One of the AUTOWIRINGMODE* constants |
|
protected string | $lifecycleInitializationMethodName | Name of the method to call during the initialization of the object (after dependencies are injected) |
|
protected string | $lifecycleShutdownMethodName | Name of the method to call during the shutdown of the framework |
|
protected string | $configurationSourceHint | Information about where this configuration has been created. Used in error messages to make debugging easier. |
Methods
The constructor
Sets the object name
Returns the object name
Setter function for property "className"
Returns the class name
Sets the package key
Returns the package key
Sets the class name of a factory which is in charge of instantiating this object
Returns the class name of the factory for this object, if any
Sets the name of the factory method
Returns the factory method name
Returns true if factoryObjectName or factoryMethodName are defined.
Setter function for property "scope"
Returns the scope for this object
Setter function for property "autowiring"
Returns the autowiring mode for the configured object
Setter function for property "lifecycleInitializationMethodName"
Returns the name of the lifecycle initialization method for this object
Setter function for property "lifecycleShutdownMethodName"
Returns the name of the lifecycle shutdown method for this object
Setter function for injection properties. If an empty array is passed to this method, all (possibly) defined properties are removed from the configuration.
Returns the currently set injection properties of the object
Setter function for injection constructor arguments. If an empty array is passed to this method, all (possibly) defined constructor arguments are removed from the configuration.
Returns a sorted array of constructor arguments indexed by position (starting with "1")
Setter function for a single factory method argument
Returns a sorted array of factory method arguments indexed by position (starting with "1")
Sets some information (hint) about where this configuration has been created.
Returns some information (if any) about where this configuration has been created.
Details
__construct(string $objectName, string $className = null)
The constructor
void
setObjectName(string $objectName)
Sets the object name
string
getObjectName()
Returns the object name
void
setClassName(string $className)
Setter function for property "className"
string
getClassName()
Returns the class name
void
setPackageKey(string $packageKey)
Sets the package key
string
getPackageKey()
Returns the package key
void
setFactoryObjectName(string $objectName)
Sets the class name of a factory which is in charge of instantiating this object
string
getFactoryObjectName()
Returns the class name of the factory for this object, if any
void
setFactoryMethodName(string $methodName)
Sets the name of the factory method
string
getFactoryMethodName()
Returns the factory method name
bool
isCreatedByFactory()
Returns true if factoryObjectName or factoryMethodName are defined.
void
setScope(int $scope)
Setter function for property "scope"
string
getScope()
Returns the scope for this object
void
setAutowiring(int $autowiring)
Setter function for property "autowiring"
int
getAutowiring()
Returns the autowiring mode for the configured object
void
setLifecycleInitializationMethodName(string $lifecycleInitializationMethodName)
Setter function for property "lifecycleInitializationMethodName"
string
getLifecycleInitializationMethodName()
Returns the name of the lifecycle initialization method for this object
void
setLifecycleShutdownMethodName(string $lifecycleShutdownMethodName)
Setter function for property "lifecycleShutdownMethodName"
string
getLifecycleShutdownMethodName()
Returns the name of the lifecycle shutdown method for this object
void
setProperties(array $properties)
Setter function for injection properties. If an empty array is passed to this method, all (possibly) defined properties are removed from the configuration.
ConfigurationProperty[]
getProperties()
Returns the currently set injection properties of the object
void
setProperty(ConfigurationProperty $property)
Setter function for a single injection property
void
setArguments(array $arguments)
Setter function for injection constructor arguments. If an empty array is passed to this method, all (possibly) defined constructor arguments are removed from the configuration.
void
setArgument(ConfigurationArgument $argument)
Setter function for a single constructor argument
ConfigurationArgument[]
getArguments()
Returns a sorted array of constructor arguments indexed by position (starting with "1")
void
setFactoryArgument(ConfigurationArgument $argument)
Setter function for a single factory method argument
ConfigurationArgument[]
getFactoryArguments()
Returns a sorted array of factory method arguments indexed by position (starting with "1")
void
setConfigurationSourceHint(string $hint)
Sets some information (hint) about where this configuration has been created.
string
getConfigurationSourceHint()
Returns some information (if any) about where this configuration has been created.