예제 #1
0
 /**
  * Initializes context of the current request.
  *
  * @param array $params Request parameters
  */
 protected function initializeContext(array $params)
 {
     $context = new HttpContext($this);
     $server = new Server($params["server"]);
     $request = new HttpRequest($server, $params["get"], $params["post"], $params["files"], $params["cookie"]);
     $response = new HttpResponse($context);
     $context->initialize($request, $response, $server, array('env' => $params["env"]));
     $this->setContext($context);
 }
예제 #2
0
 /**
  * Initializes context of the current request.
  */
 protected function initializeContext()
 {
     $context = new HttpContext($this);
     $server = new Server($this->arInputParameters["server"]);
     $request = new HttpRequest($server, $this->arInputParameters["get"], $this->arInputParameters["post"], $this->arInputParameters["files"], $this->arInputParameters["cookie"]);
     $response = new HttpResponse($context);
     $env = new Environment($this->arInputParameters["env"]);
     $context->initialize($request, $response, $server, $env);
     $this->setContext($context);
 }