Permalink
Browse files

Adding missing reference operators to getInstance methods.

  • Loading branch information...
1 parent ba06b5b commit af92276ba98ab06602b74fb6ec79d7220aefe922 @markstory markstory committed Mar 6, 2010
View
@@ -163,7 +163,7 @@ function _buildEngine($name) {
* @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 @@ function configured() {
* @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;
}
@@ -653,7 +653,7 @@ function loadModel($modelClass = null, $id = null) {
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 {
@@ -1843,7 +1843,7 @@ function testChangingParamsFromBeforeFilter() {
*/
function testAssets() {
Router::reload();
- $Configure = Configure::getInstance();
+ $Configure =& Configure::getInstance();
$Configure->__objects = null;
App::build(array(
@@ -321,16 +321,16 @@ function testDump() {
* @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');
}
}
@@ -588,7 +588,7 @@ function __testObjectFilesFromGroupFile($groupFile, $isApp = true) {
*/
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));

0 comments on commit af92276

Please sign in to comment.