/** * 将路由解析到的url参数信息保存早系统变量中 * * @return void */ protected function set_params() { if (isset($this->params['app'])) { $this->set_app(Base_Request::get_request('app', $this->_config['application'])); } $this->set_controller(Base_Request::get_request('controller', $this->_config['controller'])); $this->set_action(Base_Request::get_request('action', $this->_config['action'])); // 合并配置文件到变量 if (isset($this->_config['data']['POST']) && is_array($this->_config['data']['POST'])) { foreach ($this->_config['data']['POST'] as $_key => $_value) { if (!isset($_POST[$_key])) { $_POST[$_key] = $_value; } } } if (isset($this->_config['data']['GET']) && is_array($this->_config['data']['GET'])) { foreach ($this->_config['data']['GET'] as $_key => $_value) { if (!isset($_GET[$_key])) { $_GET[$_key] = $_value; } } } if (isset($_GET['page'])) { $_GET['page'] = max(intval($_GET['page']), 1); } return; }