Public Member Functions | |
| _setupAutoloader ($options) | |
| Setup Autoloader. | |
| getAutoloader () | |
| Get Autoloader. | |
| init () | |
Protected Attributes | |
| $_autoloader = null | |
Definition at line 34 of file Autoloader.php.
| Robo47_Application_Resource_Autoloader::_setupAutoloader | ( | $ | options | ) |
Setup Autoloader.
| string | $name | |
| array | $config |
Definition at line 61 of file Autoloader.php.
Referenced by init().
{
if (!isset($options['classname'])) {
$message = 'Autoloader config doesn\'t contain classname';
throw new Robo47_Application_Resource_Exception($message);
}
if (!isset($options['prefix'])) {
$message = 'Autoloader config doesn\'t contain prefix';
throw new Robo47_Application_Resource_Exception($message);
}
$autoLoader = Zend_Loader_Autoloader::getInstance();
$classname = $options['classname'];
$prefix = $options['prefix'];
$autoLoaderInstance = new $classname();
$autoLoader->pushAutoloader($autoLoaderInstance, $prefix);
return $autoLoaderInstance;
}

| Robo47_Application_Resource_Autoloader::getAutoloader | ( | ) |
Get Autoloader.
Definition at line 86 of file Autoloader.php.
{
return $this->_autoloader;
}
| Robo47_Application_Resource_Autoloader::init | ( | ) |
Definition at line 43 of file Autoloader.php.
References _setupAutoloader().
{
if (!empty($this->_options)) {
$this->_autoloader = $this->_setupAutoloader($this->_options);
} else {
$message = 'Empty options in resource ' .
'Robo47_Application_Resource_Autoloader.';
throw new Robo47_Application_Resource_Exception($message);
}
}

Robo47_Application_Resource_Autoloader::$_autoloader = null [protected] |
Definition at line 41 of file Autoloader.php.
1.7.1