function $dispatcher->setDefaultModule("xxx") is unable to set default module from index to others(Yaf >=1.0.0)
Yaf_Dispatcher::setDefaultModule — Change default module name
Change the module name which is used when a module name can not be extracted from the request URI. The module must be a registered one, see Yaf_Application::getModules().
moduleThe name of a registered module.
Returns the Yaf_Dispatcher object itself on
success, false if the given module is not registered (and a
YAF_ERR_TYPE_ERROR is triggered) or if the
application is not initialized, or null otherwise.
Triggers a YAF_ERR_TYPE_ERROR error if
module is not a registered module name.
Example #1 Yaf_Dispatcher::setDefaultModule() example
<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");
// "Home" must be a registered module, e.g. via
// application.modules = "Index,Home,Admin" in conf/application.ini
Yaf_Dispatcher::getInstance()->setDefaultModule("Home");
$app->run();
?>
function $dispatcher->setDefaultModule("xxx") is unable to set default module from index to othersfunction $dispatcher->setDefaultModule("xxx") is unable to set default module from index to othersYaf_Dispatcher::setDefaultModule is not effective.
yaf version 2.2.9