LoaderAbstract is used for classes that chain from \Gems_Loader and that thus allow projects to overrule the original implementation.
I.e if you create a class
You can set more than one overrule level. I.e. you can specify the class chain Demopulse, Pulse, Gems. The loader will then always look first in Demopulse, then in Pulse and lastly in Gems.
The class inherits from \MUtil_Registry_Source as the chained classes may have values that should be set automatically, e.g. from \Zend_Registry.
| package | Gems |
|---|---|
| subpackage | Model |
| copyright | Copyright (c) 2011 Erasmus MC |
| license | New BSD License |
| since | Class available since version 1.2 |
__construct(mixed $container, array $dirs)
mixedA container acting as source for \MUtil_Registry_Source
arrayThe directories where to look for requested classes
__get($name)
addPrefixPath(string $prefix, $path, boolean $prepend = true) : \Gems_Loader_LoaderAbstract
string
booleanPut path at the beginning of the stack (has no effect when prefix / dir already set)
\Gems_Loader_LoaderAbstract(continuation pattern)_cascadedDirs(array $dirs, string $cascade, boolean $fullClassnameFallback = true) : array
arrayprefix => path
stringThe sub directories to cascade to
booleanAllows full class name specification instead of just plugin name part
arrayprefix => path_getClass(string $name, string $className= null, array $arguments= array()) : mixed
stringThe $name of the variable to store this object in.
stringClass name or null if the same as $name, prepending $this->_dirs.
arrayClass initialization arguments.
mixedInstance of $className_loadClass(string $name, boolean $create= false, array $arguments= array()) : mixed
$_dirs : array
The standard value is
But an alternative could be:
$_loader : \MUtil_Loader_PluginLoader
$cascade : string
null