| 176 | | |
| 177 | | if($moduleName == null) { |
| 178 | | // no module has been specified |
| 179 | | $container->setModuleName(AgaviConfig::get('actions.default_module')); |
| 180 | | $container->setActionName(AgaviConfig::get('actions.default_action')); |
| | 179 | if(!$moduleName) { |
| | 180 | // no module has been specified; that means the routing did not run, as it would otherwise have the 404 action's module name |
| | 181 | |
| | 182 | // lets see if our request data has values for module and action |
| | 183 | $ma = $rq->getParameter('module_accessor'); |
| | 184 | $aa = $rq->getParameter('action_accessor'); |
| | 185 | if($rd->hasParameter($ma) && $rd->hasParameter($aa)) { |
| | 186 | // yup. grab those |
| | 187 | $moduleName = $rd->getParameter($ma); |
| | 188 | $actionName = $rd->getParameter($aa); |
| | 189 | } else { |
| | 190 | // nope. then its time for the default action |
| | 191 | $moduleName = AgaviConfig::get('actions.default_module'); |
| | 192 | $actionName = AgaviConfig::get('actions.default_action'); |
| | 193 | } |
| | 194 | |
| | 195 | // so by now we hopefully have something reasonable for module and action names - let's set them on the container |
| | 196 | $container->setModuleName($moduleName); |
| | 197 | $container->setActionName($actionName); |