Adding missing reference operators to getInstance methods.

This commit is contained in:
Mark Story 2010-03-05 21:41:48 -05:00
parent ba06b5b456
commit af92276ba9
5 changed files with 9 additions and 9 deletions

View file

@ -163,7 +163,7 @@ class Cache {
* @return array Array of configured Cache config names.
*/
function configured() {
$self = Cache::getInstance();
$self =& Cache::getInstance();
return array_keys($self->__config);
}
@ -176,7 +176,7 @@ class Cache {
* @return boolen success of the removal, returns false when the config does not exist.
*/
function drop($name) {
$self = Cache::getInstance();
$self =& Cache::getInstance();
if (!isset($self->__config[$name])) {
return false;
}

View file

@ -653,7 +653,7 @@ class Controller extends Object {
if ($this->persistModel === true) {
$this->_persist($modelClass, true, $this->{$modelClass});
$registry = ClassRegistry::getInstance();
$registry =& ClassRegistry::getInstance();
$this->_persist($modelClass . 'registry', true, $registry->__objects, 'registry');
}
} else {

View file

@ -1843,7 +1843,7 @@ class DispatcherTest extends CakeTestCase {
*/
function testAssets() {
Router::reload();
$Configure = Configure::getInstance();
$Configure =& Configure::getInstance();
$Configure->__objects = null;
App::build(array(

View file

@ -321,16 +321,16 @@ class DebuggerTest extends CakeTestCase {
* @return void
*/
function testGetInstance() {
$result = Debugger::getInstance();
$result =& Debugger::getInstance();
$this->assertIsA($result, 'Debugger');
$result = Debugger::getInstance('DebuggerTestCaseDebugger');
$result =& Debugger::getInstance('DebuggerTestCaseDebugger');
$this->assertIsA($result, 'DebuggerTestCaseDebugger');
$result = Debugger::getInstance();
$result =& Debugger::getInstance();
$this->assertIsA($result, 'DebuggerTestCaseDebugger');
$result = Debugger::getInstance('Debugger');
$result =& Debugger::getInstance('Debugger');
$this->assertIsA($result, 'Debugger');
}
}

View file

@ -588,7 +588,7 @@ class CodeCoverageManager {
*/
function __getExecutableLines($content) {
if (is_array($content)) {
$manager = CodeCoverageManager::getInstance();
$manager =& CodeCoverageManager::getInstance();
$result = array();
foreach ($content as $file) {
$result[$file] = $manager->__getExecutableLines(file_get_contents($file));