From 759900068045a6ebbb6ee2b256a0fc98a586c47c Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 10 Jun 2008 00:29:20 +0000 Subject: [PATCH] =?UTF-8?q?php4=EC=97=90=EC=84=9C=20function=EB=82=B4?= =?UTF-8?q?=EC=97=90=20static=20=EC=A7=80=EC=8B=9C=EC=9E=90=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EA=B0=80=EB=8A=A5=ED=95=A8=EC=9D=84=20=EC=9E=AC?= =?UTF-8?q?=ED=99=95=EC=9D=B8=ED=95=98=EC=97=AC=20r4260=20rollback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4262 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/context/Context.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 1789dd95b..a95499c36 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -50,11 +50,12 @@ /** * @brief 유일한 Context 객체를 반환 (Singleton) * - * Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용 (php4 호환 때문에) + * Context는 어디서든 객체 선언없이 사용하기 위해서 GLOBALS 변수에 저장후 재사용 **/ function &getInstance() { - if(!$GLOBALS['__ContextInstance__']) $GLOBALS['__ContextInstance__'] = new Context(); - return $GLOBALS['__ContextInstance__']; + static $theInstance; + if(!isset($theInstance)) $theInstance = new Context(); + return $theInstance; } /**