Loader of class instances based on dependency structure defined in an XML configuration file.
| package |
Default |
|---|
__construct(\Dotpay\Loader\Parser|null $current = null, \Dotpay\Loader\Parser|null $default = null)
findObject(string $name) : object
| Throws |
|
|---|
stringA class name or an alias of an object
object
get(string $name, array $params = array()) : object|null
stringA class name or an alias of an object which is returned
arraySet of params which is used to an initialization
object|null
getObjectInstance(object $object, array $params = array()) : object|null
objectThe Object instance which describes returned object
arrayThe param list
object|null
initialize(\Dotpay\Loader\Parser|null $current = null, \Dotpay\Loader\Parser|null $default = null)
load(\Dotpay\Loader\Parser|null $current = null, \Dotpay\Loader\Parser|null $default = null) : \Dotpay\Loader\Loader
object(string $className, array $params = array(), string|null $alias = null) : object
stringThe class name of the object
arrayThe arameter list
string|nullThe alias of the object
object
parameter(string $name, mixed $value) : object
Return the Object whose value has been set.
| Throws |
|
|---|
stringA name of the parameter, which is composed of a class name and a parameter name, separated by ":" character
mixedA value of the parameter
object
set(string $className, object $object, string|null $alias = null) : object
Return the Object which represents the given object.
stringClass name of the given object
objectThe object which is set
string|nullAlias of the given object
object
unload()
updateObjects(array $objects)
arrayA set of new objects
instance : \Dotpay\Loader\Loader|null
objects : array
| var |
List of Object elements which can contain instantiated objects. Keys are class names |
|---|
array
aliases : array
| var |
List of Object elements which can contain instantiated objects. Keys are aliases |
|---|
array