summaryrefslogtreecommitdiff
path: root/framework/TApplication.php
diff options
context:
space:
mode:
authorxue <>2006-01-14 00:19:18 +0000
committerxue <>2006-01-14 00:19:18 +0000
commitf16aa6762984e4d555a1cf93692db0a69fa2ab38 (patch)
tree5a460a73acb869cc58ecb1277118b2e039e0fd1b /framework/TApplication.php
parentf0737c5b52373f262a4c8cfd25d4e1bb6ff33aee (diff)
Added TBaseDataList control. Updated class tree. Modified TTextBox about SafeHtml support. Modified TTextBox demo accordingly.
Diffstat (limited to 'framework/TApplication.php')
-rw-r--r--framework/TApplication.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php
index d8214f09..d0c9a6d9 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -478,7 +478,10 @@ class TApplication extends TComponent
*/
public function setModule($id,IModule $module)
{
- $this->_modules[$id]=$module;
+ if(isset($this->_modules[$id]))
+ throw new TConfigurationException('application_moduleid_duplicated',$id);
+ else
+ $this->_modules[$id]=$module;
}
/**
@@ -762,7 +765,7 @@ class TApplication extends TComponent
Prado::trace("Loading module $id ({$moduleConfig[0]})",'System.TApplication');
$module=Prado::createComponent($moduleConfig[0]);
- $this->_modules[$id]=$module;
+ $this->setModule($id,$module);
foreach($moduleConfig[1] as $name=>$value)
$module->setSubProperty($name,$value);
$module->init($moduleConfig[2]);