/** * Constructor * * @param array $options Associative array of options * @throws \Zend\Cache\Exception * @return void */ public function __construct(array $options = array()) { parent::__construct($options); if ($this->_options['slow_backend'] === null) { Cache\Cache::throwException('slow_backend option has to set'); } if ($this->_options['fast_backend'] === null) { Cache\Cache::throwException('fast_backend option has to set'); } $this->_slowBackend = Cache\Cache::_makeBackend($this->_options['slow_backend'], $this->_options['slow_backend_options'], $this->_options['slow_backend_custom_naming'], $this->_options['slow_backend_autoload']); $this->_fastBackend = Cache\Cache::_makeBackend($this->_options['fast_backend'], $this->_options['fast_backend_options'], $this->_options['fast_backend_custom_naming'], $this->_options['fast_backend_autoload']); if (!in_array('Zend_Cache_Backend_ExtendedInterface', class_implements($this->_slowBackend))) { Cache\Cache::throwException('slow_backend must implement the Zend_Cache_Backend_ExtendedInterface interface'); } if (!in_array('Zend_Cache_Backend_ExtendedInterface', class_implements($this->_fastBackend))) { Cache\Cache::throwException('fast_backend must implement the Zend_Cache_Backend_ExtendedInterface interface'); } $this->_slowBackend->setDirectives($this->_directives); $this->_fastBackend->setDirectives($this->_directives); }