diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/TApplication.php | 5 | ||||
-rw-r--r-- | framework/Web/Services/TPageService.php | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/framework/TApplication.php b/framework/TApplication.php index 8cc1e9f9..fd341b43 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -846,6 +846,7 @@ class TApplication extends TComponent // load and init modules specified in app config $this->_modules=array(); + $modules=array(); foreach($config->getModules() as $id=>$moduleConfig) { Prado::trace("Loading module $id ({$moduleConfig[0]})",'System.TApplication'); @@ -855,8 +856,10 @@ class TApplication extends TComponent $this->setModule($id,$module); foreach($moduleConfig[1] as $name=>$value) $module->setSubProperty($name,$value); - $module->init($moduleConfig[2]); + $modules[]=array($module,$moduleConfig[2]); } + foreach($modules as $module) + $module[0]->init($module[1]); // load service $services=$config->getServices(); diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php index 09f1027e..cebedc63 100644 --- a/framework/Web/Services/TPageService.php +++ b/framework/Web/Services/TPageService.php @@ -182,6 +182,7 @@ class TPageService extends TService }
// load modules specified in page directory config
+ $modules=array();
foreach($pageConfig->getModules() as $id=>$moduleConfig)
{
Prado::trace("Loading module $id ({$moduleConfig[0]})",'System.Web.Services.TPageService');
@@ -190,8 +191,10 @@ class TPageService extends TService $application->setModule($id,$module);
foreach($moduleConfig[1] as $name=>$value)
$module->setSubProperty($name,$value);
- $module->init($moduleConfig[2]);
+ $modules[]=array($module,$moduleConfig[2]);
}
+ foreach($modules as $module)
+ $module[0]->init($module[1]);
$application->getAuthorizationRules()->mergeWith($pageConfig->getRules());
}
|