Class Swift_DependencyContainer
Dependency Injection container.
Author: Chris Corbyn
Located at vendors/swiftmailer/lib/classes/Swift/DependencyContainer.php
Methods summary
public
|
#
__construct( )
Constructor should not be used. Use |
public static
|
|
public
array
|
|
public
boolean
|
|
public
mixed
|
|
public
array
|
#
createDependenciesFor( string $itemName )
Create an array of arguments passed to the constructor of $itemName. |
public
|
#
register( string $itemName )
Register a new dependency with $itemName. This method returns the current DependencyContainer instance because it requires the use of the fluid interface to set the specific details for the dependency. |
public
|
#
asValue( mixed $value )
Specify the previously registered item as a literal value. |
public
|
|
public
|
#
asNewInstanceOf( string $className )
Specify the previously registered item as a new instance of $className.
|
public
|
#
asSharedInstanceOf( string $className )
Specify the previously registered item as a shared instance of $className.
|
public
|
#
withDependencies( array $lookups )
Specify a list of injected dependencies for the previously registered item. This method takes an array of lookup names. |
public
|
#
addConstructorValue( mixed $value )
Specify a literal (non looked up) value for the constructor of the previously registered item. |
public
|
#
addConstructorLookup( string $lookup )
Specify a dependency lookup for the constructor of the previously registered item. |
private
|
|
private
|
|
private
|
|
private
|
|
private
&
|
|
private
|
|
private
|
Magic methods summary
Constants summary
integer |
TYPE_VALUE |
0x0001 |
#
Constant for literal value types |
integer |
TYPE_INSTANCE |
0x0010 |
#
Constant for new instance types |
integer |
TYPE_SHARED |
0x0100 |
#
Constant for shared instance types |
integer |
TYPE_ALIAS |
0x1000 |
#
Constant for aliases |
Properties summary
private static
mixed
|
$_instance |
#
Singleton instance |
private
array
|
$_store |
#
The data container |
private
mixed
|
$_endPoint |
#
The current endpoint in the data container |