Public Member Functions | Protected Attributes

Robo47_Application_Resource_Autoloader Class Reference

List of all members.

Public Member Functions

 _setupAutoloader ($options)
 Setup Autoloader.
 getAutoloader ()
 Get Autoloader.
 init ()

Protected Attributes

 $_autoloader = null

Detailed Description

Definition at line 34 of file Autoloader.php.


Member Function Documentation

Robo47_Application_Resource_Autoloader::_setupAutoloader ( options  ) 

Setup Autoloader.

See also:
Zend_Loader_Autoloader
Parameters:
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;
    }

Here is the caller graph for this function:

Robo47_Application_Resource_Autoloader::getAutoloader (  ) 

Get Autoloader.

Returns:
Zend_Loader_Autoloader_Interface

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);
        }
    }

Here is the call graph for this function:


Member Data Documentation

Robo47_Application_Resource_Autoloader::$_autoloader = null [protected]

Definition at line 41 of file Autoloader.php.


The documentation for this class was generated from the following file: