Esempio n. 1
0
 /**
  * @param Request $request
  * @param Response $response
  */
 public function __construct(Request $request, Response $response)
 {
     $this->cookies = $request->getCookies();
     $this->response = $response;
     self::$instance = $this;
 }
Esempio n. 2
0
 /**
  * @param $url
  * @param int $code
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function url($url, $code = 302)
 {
     substr($url, 0, 4) !== "http" ? $this->setTargetUrl($this->request->root() . '/' . ltrim($url, '/')) : $this->setTargetUrl($url);
     $this->setStatusCode($code);
     return $this->send();
 }