Navigation Menu

Skip to content

Commit

Permalink
Moving more classes to the new layout, it is time to bring the debugg…
Browse files Browse the repository at this point in the history
…er up
  • Loading branch information
lorenzo committed Dec 4, 2010
1 parent 3c23080 commit 73ad538
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 24 deletions.
25 changes: 4 additions & 21 deletions lib/Cake/Cache/Cache.php
Expand Up @@ -19,6 +19,8 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

App::uses('Inflector', 'Utility');

/**
* Caching for CakePHP.
*
Expand Down Expand Up @@ -109,7 +111,8 @@ protected static function _buildEngine($name) {

list($plugin, $class) = pluginSplit($config['engine']);
$cacheClass = $class . 'Engine';
if (!class_exists($cacheClass) && self::_loadEngine($class, $plugin) === false) {
App::uses($cacheClass, 'Cache/Engine');
if (!class_exists($cacheClass)) {
return false;
}
$cacheClass = $class . 'Engine';
Expand Down Expand Up @@ -151,26 +154,6 @@ public static function drop($name) {
return true;
}

/**
* Tries to find and include a file for a cache engine and returns object instance
*
* @param $name Name of the engine (without 'Engine')
* @return mixed $engine object or null
*/
protected static function _loadEngine($name, $plugin = null) {
if ($plugin) {
return App::import('Lib', $plugin . '.cache' . DS . $name, false);
} else {
$core = App::core();
$path = $core['libs'][0] . 'cache' . DS . strtolower($name) . '.php';
if (file_exists($path)) {
require $path;
return true;
}
return App::import('Lib', 'cache' . DS . $name, false);
}
}

/**
* Temporarily change the settings on a cache config. The settings will persist for the next write
* operation (write, decrement, increment, clear). Any reads that are done before the write, will
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions lib/Cake/bootstrap.php
Expand Up @@ -219,14 +219,15 @@


require LIBS . 'basics.php';
require LIBS . 'Utility' . DS . 'Inflector.php';
require LIBS . 'Utility' . DS . 'Folder.php';
require LIBS . 'Core' . DS .'App.php';
require LIBS . 'Error' . DS . 'exceptions.php';

App::uses('ErrorHandler', 'Error');
App::uses('Configure', 'Core');
App::uses('Cache', 'Cache');

//require LIBS . 'error' . DS . 'exceptions.php';


//require LIBS . 'object.php';
//require LIBS . 'configure.php';
//require LIBS . 'set.php';
Expand Down

0 comments on commit 73ad538

Please sign in to comment.