summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2006-06-28 20:29:33 +0000
committerxue <>2006-06-28 20:29:33 +0000
commit1988e9cd45fce05d26f0682f6d1cbdfb72cd2370 (patch)
tree2d6f01b70620bb40ee0641bf42c84dd83ce91cc6 /framework/Web/UI
parent2121ac351266a79adee962a824aa58b1a643c980 (diff)
Enhanced some error description.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/TThemeManager.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 66bfa8be..245f8049 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -10,6 +10,8 @@
* @package System.Web.UI
*/
+Prado::using('System.Web.Services.TPageService');
+
/**
* TThemeManager class
*
@@ -63,7 +65,11 @@ class TThemeManager extends TModule
public function init($config)
{
$this->_initialized=true;
- $this->getService()->setThemeManager($this);
+ $service=$this->getService();
+ if($service instanceof TPageService)
+ $service->setThemeManager($this);
+ else
+ throw new TConfigurationException('thememanager_service_unavailable');
}
/**
@@ -105,7 +111,7 @@ class TThemeManager extends TModule
{
$this->_basePath=dirname($this->getRequest()->getApplicationFilePath()).'/'.self::DEFAULT_BASEPATH;
if(($basePath=realpath($this->_basePath))===false || !is_dir($basePath))
- throw new TConfigurationException('thememanager_basepath_invalid',$this->_basePath);
+ throw new TConfigurationException('thememanager_basepath_invalid2',$this->_basePath);
$this->_basePath=$basePath;
}
return $this->_basePath;