Public Member Functions | Protected Attributes

Robo47_Application_Resource_CacheMulti Class Reference

List of all members.

Public Member Functions

 getCache ($name)
 Get Cache.
 getCaches ()
 Get Caches.
 init ()

Protected Attributes

 $_caches = array()

Detailed Description

Definition at line 34 of file CacheMulti.php.


Member Function Documentation

Robo47_Application_Resource_CacheMulti::getCache ( name  ) 

Get Cache.

Parameters:
string $name
Returns:
Zend_Cache_Core

Definition at line 65 of file CacheMulti.php.

    {
        if (isset($this->_caches[$name])) {
            return $this->_caches[$name];
        } else {
            $message = 'Cache \'' . $name . '\' doesn\'t exist';
            throw new Robo47_Application_Resource_Exception($message);
        }
    }

Robo47_Application_Resource_CacheMulti::getCaches (  ) 

Get Caches.

Returns:
array

Definition at line 80 of file CacheMulti.php.

    {
        return $this->_caches;
    }

Robo47_Application_Resource_CacheMulti::init (  ) 

Definition at line 44 of file CacheMulti.php.

    {
        if (!empty($this->_options)) {
            foreach ($this->_options as $name => $options) {
                $resource = new Robo47_Application_Resource_Cache($options);
                $resource->init();
                $this->_caches[$name] = $resource->getCache();
            }
        } else {
            $message = 'Empty options in resource ' .
                'Robo47_Application_Resource_CacheMulti.';
            throw new Robo47_Application_Resource_Exception($message);
        }
    }


Member Data Documentation

Robo47_Application_Resource_CacheMulti::$_caches = array() [protected]

Definition at line 42 of file CacheMulti.php.


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