mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
php4에서 function내에 static 지시자 사용가능함을 재확인하여 r4260 rollback
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4262 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ef0c5cb063
commit
7599000680
1 changed files with 4 additions and 3 deletions
|
|
@ -50,11 +50,12 @@
|
||||||
/**
|
/**
|
||||||
* @brief 유일한 Context 객체를 반환 (Singleton)
|
* @brief 유일한 Context 객체를 반환 (Singleton)
|
||||||
*
|
*
|
||||||
* Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용 (php4 호환 때문에)
|
* Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용
|
||||||
**/
|
**/
|
||||||
function &getInstance() {
|
function &getInstance() {
|
||||||
if(!$GLOBALS['__ContextInstance__']) $GLOBALS['__ContextInstance__'] = new Context();
|
static $theInstance;
|
||||||
return $GLOBALS['__ContextInstance__'];
|
if(!isset($theInstance)) $theInstance = new Context();
|
||||||
|
return $theInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue