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 | |
copyright | Copyright (c) 2013 Erasmus MC |
license | New BSD License |
since | Class available since version 1.6.2 |
inherited_from | \Gems_Loader_LoaderAbstract |
__construct(mixed $container, array $dirs)
mixed
A container acting as source for \MUtil_Registry_Source
array
The directories where to look for requested classes
__get($name)
addPrefixPath(string $prefix, $path, boolean $prepend = true
) : \Gems_Loader_LoaderAbstract
string
boolean
Put path at the beginning of the stack (has no effect when prefix / dir already set)
\Gems_Loader_LoaderAbstract
(continuation pattern)getMailElements() : \Gems_Mail_MailElements
\Gems_Mail_MailElements
getMailForm() : \Gems_Mail_MailForm
\Gems_Mail_MailForm
getMailTargets() : Array
Array
mailtargetsgetMailer(\[type] $target= null
, $id= false
, $orgId= false
) : \Gems_Mail_MailerAbstract
\[type]
mailtarget (lowercase)
\Gems_Mail_MailerAbstract
class_cascadedDirs(array $dirs, string $cascade, boolean $fullClassnameFallback = true
) : array
array
prefix => path
string
The sub directories to cascade to
boolean
Allows full class name specification instead of just plugin name part
array
prefix => path_getClass(string $name, string $className= null
, array $arguments= array()
) : mixed
string
The $name of the variable to store this object in.
string
Class name or null if the same as $name, prepending $this->_dirs.
array
Class initialization arguments.
mixed
Instance 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
'Mail'
inherited_from | \Gems_Loader_LoaderAbstract::cascade |
---|
$cascade : string
null
$db : \Zend_Db_Adapter_Abstract
$mailTargets : array
array('staff' => 'Staff', 'respondent' => 'Respondent', 'token' => 'Token', 'staffPassword' => 'Password reset')