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