Additional optimization refactoring

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7597 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-09-13 18:59:30 +00:00
parent cb487bd6e6
commit 2b95df3abf
8 changed files with 10 additions and 11 deletions

View file

@ -40,7 +40,6 @@ if (!defined('PHP5')) {
require LIBS . 'inflector.php';
require LIBS . 'configure.php';
}
require LIBS . 'file.php';
require LIBS . 'cache.php';
Configure::getInstance();

View file

@ -504,7 +504,7 @@ class CacheEngine extends Object {
if (empty($key)) {
return false;
}
$key = Inflector::slug(str_replace(array(DS, '/', '.'), '_', strval($key)));
$key = Inflector::underscore(str_replace(array(DS, '/', '.'), '_', strval($key)));
return $key;
}
}

View file

@ -86,7 +86,7 @@ class FileEngine extends CacheEngine {
));
if(!isset($this->__File)) {
if (!class_exists('File')) {
uses('file');
require LIBS . 'file.php';
}
$this->__File =& new File($this->settings['path'] . DS . 'cake');
}

View file

@ -31,7 +31,7 @@
*
*/
if (!class_exists('File')) {
uses('file');
require LIBS . 'file.php';
}
/**
* Set up error level constants to be used within the framework if they are not defined within the

View file

@ -208,7 +208,7 @@ class Configure extends Object {
*/
function __list($path, $suffix = false, $extension = false) {
if (!class_exists('Folder')) {
uses('folder');
require LIBS . 'folder.php';
}
$items = array();
$Folder =& new Folder($path);
@ -276,10 +276,10 @@ class Configure extends Object {
}
if (!class_exists('Debugger')) {
uses('debugger');
require LIBS . 'debugger.php';
}
if (!class_exists('CakeLog')) {
uses('cake_log');
require LIBS . 'cake_log.php';
}
Configure::write('log', LOG_NOTICE);
} else {
@ -521,7 +521,7 @@ class Configure extends Object {
if ($write === true) {
if (!class_exists('File')) {
uses('file');
require LIBS . 'file.php';
}
$fileClass = new File($file);

View file

@ -27,7 +27,7 @@
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
if (!class_exists('cakesession')) {
uses('session');
require LIBS . 'session.php';
}
/**
* Session Component.

View file

@ -491,7 +491,7 @@ class Inflector extends Object {
*/
function slug($string, $replacement = '_') {
if (!class_exists('String')) {
require_once LIBS . 'string.php';
require LIBS . 'string.php';
}
$map = array(
'/à|á|å|â/' => 'a',

View file

@ -34,7 +34,7 @@
*
*/
if (!class_exists('Set')) {
uses('set');
require LIBS . 'set.php';
}
/**
* Session class for Cake.