diff options
author | xue <> | 2007-03-03 23:00:56 +0000 |
---|---|---|
committer | xue <> | 2007-03-03 23:00:56 +0000 |
commit | e6191197dbebab3ebee0a53ca2757c22e5b684c3 (patch) | |
tree | 1c4616d6a803dbd698e51ed943d3608c1262ac6f /framework/Web | |
parent | 30ca1077cf5a351a748ee18340b6f4e658f06b10 (diff) |
Fixed #551.
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/Services/TPageService.php | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index 7d434523..e53d796f 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -189,7 +189,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());
}
else
@@ -545,19 +545,39 @@ class TPageConfiguration extends TComponent }
/**
- * Loads a specific configuration xml element.
+ * Loads a page configuration.
+ * The configuration includes information for both application
+ * and page service.
* @param TXmlElement config xml element
* @param string base path corresponding to this xml element
* @param string page name, null if page is not required
*/
public function loadFromXml($dom,$configPath,$page=null)
{
- if($page!==null) // config.xml
- {
- $appConfig=new TApplicationConfiguration;
- $appConfig->loadFromXml($dom,$configPath);
- $this->_appConfigs[]=$appConfig;
- }
+ $this->loadApplicationConfigurationFromXml($dom,$configPath);
+ $this->loadPageConfigurationFromXml($dom,$configPath,$page);
+ }
+
+ /**
+ * Loads the configuration specific for application part
+ * @param TXmlElement config xml element
+ * @param string base path corresponding to this xml element
+ */
+ public function loadApplicationConfigurationFromXml($dom,$configPath)
+ {
+ $appConfig=new TApplicationConfiguration;
+ $appConfig->loadFromXml($dom,$configPath);
+ $this->_appConfigs[]=$appConfig;
+ }
+
+ /**
+ * Loads the configuration specific for page service.
+ * @param TXmlElement config xml element
+ * @param string base path corresponding to this xml element
+ * @param string page name, null if page is not required
+ */
+ public function loadPageConfigurationFromXml($dom,$configPath,$page=null)
+ {
// authorization
if(($authorizationNode=$dom->getElementByTagName('authorization'))!==null)
{
|