Yaf_Application::getDispatcher
(Since Yaf 1.0.0.6)
例 11.7. Yaf_Application::getDispatcher
的例子
<?php define ("APPLICATION_PATH", dirname(__FILE__)); $app = new Yaf_Application("conf/application_simple.ini"); //bootstrap $app->getDispatcher()->setAppDirectory(APPLICATION_PATH . "/action/")->getApplication()->bootstrap()->run(); //当然也可以使用 $dispatcher = Yaf_Dispatcher::getInstance()->setAppDirectory(APPLICATION_PATH . "/action/")->getApplication()->bootstrap()->run(); ?>