- Timestamp:
- 06/10/2008 09:29:20 AM (3 months ago)
- Files:
-
- 1 modified
-
sandbox/classes/context/Context.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/classes/context/Context.class.php
r4261 r4262 51 51 * @brief 유일한 Context 객체를 반환 (Singleton) 52 52 * 53 * Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용 (php4 호환 때문에)53 * Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용 54 54 **/ 55 55 function &getInstance() { 56 if(!$GLOBALS['__ContextInstance__']) $GLOBALS['__ContextInstance__'] = new Context(); 57 return $GLOBALS['__ContextInstance__']; 56 static $theInstance; 57 if(!isset($theInstance)) $theInstance = new Context(); 58 return $theInstance; 58 59 } 59 60