From 8746007d968660f93dac079477405ded6fa14cbe Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 6 Mar 2007 13:42:50 +0000 Subject: Modified component inclusion method in bootstrap code. Fixed a bug about using page configuration. --- framework/PradoBase.php | 16 ++++++------- framework/TApplication.php | 41 ++++++++++++++++----------------- framework/Web/Services/TPageService.php | 2 +- 3 files changed, 29 insertions(+), 30 deletions(-) (limited to 'framework') diff --git a/framework/PradoBase.php b/framework/PradoBase.php index 7c38ce6c..aab9aac8 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -24,13 +24,6 @@ if(!defined('PRADO_DIR')) if(!defined('PRADO_CHMOD')) define('PRADO_CHMOD',0777); -/** - * Includes the classes essential for PradoBase class - */ -require_once(PRADO_DIR.'/TComponent.php'); -require_once(PRADO_DIR.'/Exceptions/TException.php'); -require_once(PRADO_DIR.'/Util/TLogger.php'); - /** * PradoBase class. * @@ -601,4 +594,11 @@ class TReflectionClass extends ReflectionClass { } -?> +/** + * Includes the classes essential for PradoBase class + */ +PradoBase::using('System.TComponent'); +PradoBase::using('System.Exceptions.TException'); +PradoBase::using('System.Util.TLogger'); + +?> \ No newline at end of file diff --git a/framework/TApplication.php b/framework/TApplication.php index 21b00576..6b5f8fbb 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -18,27 +18,26 @@ require_once(PRADO_DIR.'/interfaces.php'); /** * Includes core classes essential for TApplication class */ -require_once(PRADO_DIR.'/TApplicationComponent.php'); -require_once(PRADO_DIR.'/TModule.php'); -require_once(PRADO_DIR.'/TService.php'); -require_once(PRADO_DIR.'/Exceptions/TErrorHandler.php'); -require_once(PRADO_DIR.'/Caching/TCache.php'); -require_once(PRADO_DIR.'/IO/TTextWriter.php'); -require_once(PRADO_DIR.'/Collections/TList.php'); -require_once(PRADO_DIR.'/Collections/TMap.php'); -require_once(PRADO_DIR.'/Collections/TStack.php'); -require_once(PRADO_DIR.'/Xml/TXmlDocument.php'); -require_once(PRADO_DIR.'/Security/TAuthorizationRule.php'); -require_once(PRADO_DIR.'/Security/TSecurityManager.php'); -require_once(PRADO_DIR.'/Web/THttpUtility.php'); -require_once(PRADO_DIR.'/Web/Javascripts/TJavaScript.php'); -require_once(PRADO_DIR.'/Web/THttpRequest.php'); -require_once(PRADO_DIR.'/Web/THttpResponse.php'); -require_once(PRADO_DIR.'/Web/THttpSession.php'); -require_once(PRADO_DIR.'/Web/Services/TPageService.php'); -require_once(PRADO_DIR.'/Web/TAssetManager.php'); -require_once(PRADO_DIR.'/I18N/TGlobalization.php'); - +Prado::using('System.TApplicationComponent'); +Prado::using('System.TModule'); +Prado::using('System.TService'); +Prado::using('System.Exceptions.TErrorHandler'); +Prado::using('System.Caching.TCache'); +Prado::using('System.IO.TTextWriter'); +Prado::using('System.Collections.TList'); +Prado::using('System.Collections.TMap'); +Prado::using('System.Collections.TStack'); +Prado::using('System.Xml.TXmlDocument'); +Prado::using('System.Security.TAuthorizationRule'); +Prado::using('System.Security.TSecurityManager'); +Prado::using('System.Web.THttpUtility'); +Prado::using('System.Web.Javascripts.TJavaScript'); +Prado::using('System.Web.THttpRequest'); +Prado::using('System.Web.THttpResponse'); +Prado::using('System.Web.THttpSession'); +Prado::using('System.Web.Services.TPageService'); +Prado::using('System.Web.TAssetManager'); +Prado::using('System.I18N.TGlobalization'); /** * TApplication class. diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index e53d796f..e1bd47be 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -238,7 +238,7 @@ class TPageService extends TService { $pageConfig=new TPageConfiguration; if($config!==null) - $pageConfig->loadFromXml($config,$application->getBasePath()); + $pageConfig->loadPageConfigurationFromXml($config,$application->getBasePath()); $pageConfig->loadFromFiles($pagePath,$this->getBasePath()); $cache->set(self::CONFIG_CACHE_PREFIX.$this->getID().$pagePath,array($pageConfig,$currentTimestamp)); } -- cgit v1.2.3