/** * 从提交信息里获取CGI数据 * @author cuichao02 * @date 2011/02/21 */ public static function getRequest() { if (class_exists(Ap_Dispatcher)) { $params = Ap_Dispatcher::getInstance()->getRequest()->getParams(); if (!empty($params)) { foreach ($params as $key => $value) { $_GET[$key] = $value; } } } $request_get = self::__arrayTrans($_GET); $request_post = self::__arrayTrans($_POST); $request_param = array_merge($request_get, $request_post); $request = array('get' => $request_get, 'post' => $request_post, 'request_param' => $request_param); return $request; }
public function _initDefaultName(Ap_Dispatcher $dispatcher) { //设置路由默认信息 $dispatcher->setDefaultModule('Main')->setDefaultController('Main'); }