本文整理匯總了PHP中Illuminate\Cookie\CookieJar::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP CookieJar::get方法的具體用法?PHP CookieJar::get怎麽用?PHP CookieJar::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Cookie\CookieJar
的用法示例。
在下文中一共展示了CookieJar::get方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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);
}
}
示例2: start
/**
* Load the session for the request.
*
* @param Illuminate\CookieJar $cookies
* @param string $name
* @return void
*/
public function start(CookieJar $cookies, $name)
{
$id = $cookies->get($name);
// If the session ID was available via the request cookies we'll just retrieve
// the session payload from the driver and check the given session to make
// sure it's valid. All the data fetching is implemented by the driver.
if (!is_null($id)) {
$session = $this->retrieveSession($id);
}
// If the session is not valid, we will create a new payload and will indicate
// that the session has not yet been created. These freshly created session
// payloads will be given a fresh session ID so there are not collisions.
if (!isset($session) or $this->isInvalid($session)) {
$this->exists = false;
$session = $this->createFreshSession();
}
// Once the session payloads have been created or loaded we will set it to an
// internal values that are managed by the driver. The values are not sent
// back into storage until the sessions are closed after these requests.
$this->session = $session;
}
示例3: get
/**
* Get the Sentry cookie value.
*
* @return mixed
*/
public function get()
{
return $this->jar->get($this->getKey());
}
示例4: read
/**
* {@inheritDoc}
*/
public function read($sessionId)
{
return $this->cookie->get($sessionId) ?: '';
}