コード例 #1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $response = $next($request);
     foreach ($this->cookies->getQueuedCookies() as $cookie) {
         $response->headers->setCookie($cookie);
     }
     return $response;
 }
コード例 #2
0
 /**
  * Handle the given request and get the response.
  *
  * @implements HttpKernelInterface::handle
  *
  * @param  \Symfony\Component\HttpFoundation\Request  $request
  * @param  int   $type
  * @param  bool  $catch
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
 {
     $response = $this->app->handle($request, $type, $catch);
     foreach ($this->cookies->getQueuedCookies() as $cookie) {
         $response->headers->setCookie($cookie);
     }
     return $response;
 }
コード例 #3
0
ファイル: IlluminateCookie.php プロジェクト: kevin416/admin
 /**
  * {@inheritDoc}
  */
 public function get()
 {
     $key = $this->key;
     // Cannot use $this->jar->queued($key, function()) because it's not
     // available in 4.0.*, only 4.1+
     $queued = $this->jar->getQueuedCookies();
     if (isset($queued[$key])) {
         return $queued[$key];
     }
     return $this->request->cookie($key);
 }
コード例 #4
0
ファイル: IlluminateCookie.php プロジェクト: peintune/Ternado
 /**
  * Get the Sentry cookie value.
  *
  * @return mixed
  */
 public function get()
 {
     $key = $this->getKey();
     $queued = $this->jar->getQueuedCookies();
     if (isset($queued[$key])) {
         return $queued[$key];
     }
     if ($this->strategy === 'request') {
         return $this->request->cookie($key);
     } else {
         return $this->jar->get($key);
     }
 }
コード例 #5
0
ファイル: _ide_helper.php プロジェクト: satriashp/tour
 /**
  * Get the cookies which have been queued for the next request.
  *
  * @return array 
  * @static 
  */
 public static function getQueuedCookies()
 {
     return \Illuminate\Cookie\CookieJar::getQueuedCookies();
 }