summaryrefslogtreecommitdiff
path: root/framework/TApplication.php
diff options
context:
space:
mode:
authorxue <>2007-04-06 12:52:54 +0000
committerxue <>2007-04-06 12:52:54 +0000
commitd0bdd3144dfc972450d79ddaf6197a30b27eacc0 (patch)
treecb89b3a0be407d38300821d4ba3edd6ee73bb44d /framework/TApplication.php
parent34772099513df0734d3149e7b6d2d011f1f5e5e7 (diff)
Fixed some issues in day 2.
Diffstat (limited to 'framework/TApplication.php')
-rw-r--r--framework/TApplication.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php
index 0d3d349a..c06bd080 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -866,8 +866,12 @@ class TApplication extends TComponent
Prado::trace("Loading module $id ({$moduleConfig[0]})",'System.TApplication');
list($moduleClass, $initProperties, $configElement)=$moduleConfig;
$module=Prado::createComponent($moduleClass);
- if(is_string($id))
- $this->setModule($id,$module);
+ if(!is_string($id))
+ {
+ $id='_module'.count($this->_modules);
+ $initProperties['id']=$id;
+ }
+ $this->setModule($id,$module);
foreach($initProperties as $name=>$value)
$module->setSubProperty($name,$value);
$modules[]=array($module,$configElement);