diff options
Diffstat (limited to 'libs/Zend/Cache.php')
-rw-r--r-- | libs/Zend/Cache.php | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/libs/Zend/Cache.php b/libs/Zend/Cache.php index 761be75e17..1ea81411d8 100644 --- a/libs/Zend/Cache.php +++ b/libs/Zend/Cache.php @@ -14,15 +14,15 @@ * * @category Zend * @package Zend_Cache - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Cache.php 21974 2010-04-23 17:10:17Z alexander $ + * @version $Id: Cache.php 16200 2009-06-21 18:50:06Z thomas $ */ /** * @package Zend_Cache - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Cache @@ -40,16 +40,15 @@ abstract class Zend_Cache * * @var array */ - public static $standardBackends = array('File', 'Sqlite', 'Memcached', 'Apc', 'ZendPlatform', - 'Xcache', 'TwoLevels', 'ZendServer_Disk', 'ZendServer_ShMem'); + public static $standardBackends = array('File', 'Sqlite', 'Memcached', 'Apc', 'ZendPlatform', 'Xcache', 'TwoLevels'); /** * Standard backends which implement the ExtendedInterface - * + * * @var array */ public static $standardExtendedBackends = array('File', 'Apc', 'TwoLevels', 'Memcached', 'Sqlite'); - + /** * Only for backward compatibily (may be removed in next major release) * @@ -74,7 +73,7 @@ abstract class Zend_Cache const CLEANING_MODE_MATCHING_TAG = 'matchingTag'; const CLEANING_MODE_NOT_MATCHING_TAG = 'notMatchingTag'; const CLEANING_MODE_MATCHING_ANY_TAG = 'matchingAnyTag'; - + /** * Factory * @@ -84,7 +83,7 @@ abstract class Zend_Cache * @param array $backendOptions associative array of options for the corresponding backend constructor * @param boolean $customFrontendNaming if true, the frontend argument is used as a complete class name ; if false, the frontend argument is used as the end of "Zend_Cache_Frontend_[...]" class name * @param boolean $customBackendNaming if true, the backend argument is used as a complete class name ; if false, the backend argument is used as the end of "Zend_Cache_Backend_[...]" class name - * @param boolean $autoload if true, there will no // require_once for backend and frontend (usefull only for custom backends/frontends) + * @param boolean $autoload if true, there will no require_once for backend and frontend (usefull only for custom backends/frontends) * @throws Zend_Cache_Exception * @return Zend_Cache_Core|Zend_Cache_Frontend */ @@ -111,7 +110,7 @@ abstract class Zend_Cache $frontendObject->setBackend($backendObject); return $frontendObject; } - + /** * Frontend Constructor * @@ -130,7 +129,7 @@ abstract class Zend_Cache // we use a standard backend $backendClass = 'Zend_Cache_Backend_' . $backend; // security controls are explicit - // require_once str_replace('_', DIRECTORY_SEPARATOR, $backendClass) . '.php'; + require_once str_replace('_', DIRECTORY_SEPARATOR, $backendClass) . '.php'; } else { // we use a custom backend if (!preg_match('~^[\w]+$~D', $backend)) { @@ -147,12 +146,12 @@ abstract class Zend_Cache if (!(self::_isReadable($file))) { self::throwException("file $file not found in include_path"); } - // require_once $file; + require_once $file; } } return new $backendClass($backendOptions); } - + /** * Backend Constructor * @@ -172,7 +171,7 @@ abstract class Zend_Cache // For perfs reasons, with frontend == 'Core', we can interact with the Core itself $frontendClass = 'Zend_Cache_' . ($frontend != 'Core' ? 'Frontend_' : '') . $frontend; // security controls are explicit - // require_once str_replace('_', DIRECTORY_SEPARATOR, $frontendClass) . '.php'; + require_once str_replace('_', DIRECTORY_SEPARATOR, $frontendClass) . '.php'; } else { // we use a custom frontend if (!preg_match('~^[\w]+$~D', $frontend)) { @@ -189,7 +188,7 @@ abstract class Zend_Cache if (!(self::_isReadable($file))) { self::throwException("file $file not found in include_path"); } - // require_once $file; + require_once $file; } } return new $frontendClass($frontendOptions); @@ -202,11 +201,11 @@ abstract class Zend_Cache * @param string $msg Message for the exception * @throws Zend_Cache_Exception */ - public static function throwException($msg, Exception $e = null) + 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, 0, $e); + require_once 'Zend/Cache/Exception.php'; + throw new Zend_Cache_Exception($msg); } /** @@ -221,10 +220,6 @@ abstract class Zend_Cache $name = str_replace(array('-', '_', '.'), ' ', $name); $name = ucwords($name); $name = str_replace(' ', '', $name); - if (stripos($name, 'ZendServer') === 0) { - $name = 'ZendServer_' . substr($name, strlen('ZendServer')); - } - return $name; } |