Patching Configure to bootstrap without an app

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4564 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-02-28 15:41:44 +00:00
parent 4e7538d333
commit f4172f0de3

View file

@ -90,11 +90,11 @@ class Configure extends Object {
* @return Configure instance
* @access public
*/
function &getInstance() {
function &getInstance($boot = true) {
static $instance = array();
if (!$instance) {
$instance[0] =& new Configure;
$instance[0]->__loadBootstrap();
$instance[0]->__loadBootstrap($boot);
}
return $instance[0];
}
@ -425,7 +425,7 @@ class Configure extends Object {
*
* @access private
*/
function __loadBootstrap() {
function __loadBootstrap($boot) {
$_this =& Configure::getInstance();
$modelPaths = null;
$viewPaths = null;
@ -433,7 +433,9 @@ class Configure extends Object {
$helperPaths = null;
$componentPaths = null;
$behaviorPaths = null;
if ($boot) {
require APP_PATH . 'config' . DS . 'bootstrap.php';
}
$_this->__buildModelPaths($modelPaths);
$_this->__buildViewPaths($viewPaths);
$_this->__buildControllerPaths($controllerPaths);