Changeset 4260
- Timestamp:
- 06/09/2008 09:11:06 PM (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
r4237 r4260 49 49 50 50 /** 51 * @brief Context 객체를 GLOBALS 변수에 생성51 * @brief 유일한 Context 객체를 반환 (Singleton) 52 52 * 53 * Context는 어디서든 객체 선언없이 사용하기 위해서 static 하게 사용\n 54 * php5라면 GLOBALS가 아닌 static으로 처리 가능 53 * Context는 어디서든 객체 선언없이 사용하기 위해서 static 하게 사용 55 54 **/ 56 55 function &getInstance() { 57 if(!$GLOBALS['__ContextInstance__']) $GLOBALS['__ContextInstance__'] = new Context(); 58 return $GLOBALS['__ContextInstance__']; 56 static $theInstance = null; 57 if(!$theInstance) 58 $theInstance = new Context(); 59 return $theInstance; 59 60 } 60 61