获取当前的请求(HTTP Request)实例
public Asf_Http_Request Asf_Dispatcher::getRequest(void)
Object 代表返回成功, NULL 代表失败
<?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()->getRequest()); } } $handle = new App($configs); $handle->run();