/** * Initializes this component. * * It checks the availability of apccache. * @throws LiquidException if APC cache extension is not loaded or is disabled. */ public function __construct($options = array()) { parent::__construct($options); if (!extension_loaded('apc')) { throw new LiquidException('LiquidCacheApc requires PHP apc extension to be loaded.'); } }
/** * Initializes this component. * * It checks the availability of apccache. * @throws LiquidException if Cachedir not exists. */ public function __construct($options = array()) { parent::__construct($options); if (isset($options['cache_dir']) && is_writable($options['cache_dir'])) { $this->_path = realpath($options['cache_dir']) . DIRECTORY_SEPARATOR; } else { throw new LiquidException('Cachedir not exists or not writable'); } }