summaryrefslogtreecommitdiff
path: root/framework/Web/Services/TPageService.php
diff options
context:
space:
mode:
authorxue <>2007-03-06 14:03:42 +0000
committerxue <>2007-03-06 14:03:42 +0000
commit13bbe877ff40d62431f78da6daad4615a92698ec (patch)
tree1be0db3f72ca50c322e2c66455df25c7b1abc446 /framework/Web/Services/TPageService.php
parent8746007d968660f93dac079477405ded6fa14cbe (diff)
Better page class error reporting.
Diffstat (limited to 'framework/Web/Services/TPageService.php')
-rw-r--r--framework/Web/Services/TPageService.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index e1bd47be..aed9d3e0 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -409,12 +409,15 @@ class TPageService extends TService
$className=basename($path);
if(!class_exists($className,false))
include_once($path.Prado::CLASS_FILE_EXT);
- if(!class_exists($className,false) || !is_subclass_of($className,'TPage'))
+ if(!class_exists($className,false))
throw new TConfigurationException('pageservice_pageclass_unknown',$className);
}
else
$className=$this->getBasePageClass();
+ if($className!=='TPage' && !is_subclass_of($className,'TPage'))
+ throw new TConfigurationException('pageservice_pageclass_invalid',$className);
+
$page=Prado::createComponent($className);
$page->setPagePath($pagePath);