本文整理匯總了PHP中Zend\Cache\Cache::_makeBackend方法的典型用法代碼示例。如果您正苦於以下問題:PHP Cache::_makeBackend方法的具體用法?PHP Cache::_makeBackend怎麽用?PHP Cache::_makeBackend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend\Cache\Cache
的用法示例。
在下文中一共展示了Cache::_makeBackend方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* 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);
}