本文整理汇总了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) ?: '';
}