setBackend($backendObject); return $frontendObject; } /** * Throw an exception * * Note : for perf reasons, the "load" of Zend/Cache/Exception is dynamic * @param string $msg Message for the exception * @throws Zend_Cache_Exception */ public static function throwException($msg) { // For perfs reasons, we use this dynamic inclusion require_once 'Zend/Cache/Exception.php'; throw new Zend_Cache_Exception($msg); } /** * Normalize frontend and backend names to allow multiple words TitleCased * * @param string $name Name to normalize * @return string */ protected static function _normalizeName($name) { $name = ucfirst(strtolower($name)); $name = str_replace(array('-', '_', '.'), ' ', $name); $name = ucwords($name); $name = str_replace(' ', '', $name); return $name; } /** * Returns TRUE if the $filename is readable, or FALSE otherwise. * This function uses the PHP include_path, where PHP's is_readable() * does not. * * Note : this method comes from Zend_Loader (see #ZF-2891 for details) * * @param string $filename * @return boolean */ private static function _isReadable($filename) { if (!$fh = @fopen($filename, 'r', true)) { return false; } return true; } }