本文整理匯總了PHP中Illuminate\Cookie\CookieJar::getQueuedCookies方法的典型用法代碼示例。如果您正苦於以下問題:PHP CookieJar::getQueuedCookies方法的具體用法?PHP CookieJar::getQueuedCookies怎麽用?PHP CookieJar::getQueuedCookies使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Cookie\CookieJar
的用法示例。
在下文中一共展示了CookieJar::getQueuedCookies方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: handle
/**
* 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: handle
/**
* 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: get
/**
* {@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: get
/**
* 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: getQueuedCookies
/**
* Get the cookies which have been queued for the next request.
*
* @return array
* @static
*/
public static function getQueuedCookies()
{
return \Illuminate\Cookie\CookieJar::getQueuedCookies();
}