获取当前路由加载信息
public Asf_Router Asf_Dispatcher::getRouter(void)
<?php
use Asf\Application as App;
use Asf\Dispatcher;
$configs = array(
'asf' => array(
'root_path' => realpath(dirname(__FILE__)),
'dispatcher' => array(
'route' => array(
'type' => 'query',
'module_name' => 'm',
'service_name' => 'c',
'action_name' => 'a',
)
)
)
);
class IndexService
{
public function indexAction()
{
print_r(Dispatcher::getInstance()->getRouter());
}
}
$handle = new App($configs);
$handle->run();