php4에서의 호환을 위해서 static 지시자 rollback

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4261 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-06-10 00:22:57 +00:00
parent 65dca87956
commit ef0c5cb063

View file

@ -50,13 +50,11 @@
/** /**
* @brief 유일한 Context 객체를 반환 (Singleton) * @brief 유일한 Context 객체를 반환 (Singleton)
* *
* Context는 어디서든 객체 선언없이 사용하기 위해서 static 하게 사용 * Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용 (php4 호환 때문에)
**/ **/
function &getInstance() { function &getInstance() {
static $theInstance = null; if(!$GLOBALS['__ContextInstance__']) $GLOBALS['__ContextInstance__'] = new Context();
if(!$theInstance) return $GLOBALS['__ContextInstance__'];
$theInstance = new Context();
return $theInstance;
} }
/** /**