本文整理汇总了PHP中Illuminate\Session\Store::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP Store::remove方法的具体用法?PHP Store::remove怎么用?PHP Store::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Session\Store
的用法示例。
在下文中一共展示了Store::remove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processDataOfBirth
/**
* @return array
*/
public function processDataOfBirth()
{
// Get the date of birth that the user submitted
$dob = null;
if ($this->request->has('dob')) {
// field name is dob when using input type date
$dob = $this->request->get('dob');
} elseif ($this->request->has('dob_year') && $this->request->has('dob_month') && $this->request->has('dob_day')) {
// field name has _year, _month and _day components if input type select
$dob = $this->request->get('dob_year') . '-' . $this->request->get('dob_month') . '-' . $this->request->get('dob_day');
}
$remember_me = false;
if ($this->request->get('remember_me') == "on") {
$this->session->set('remembered_day', $this->request->get('dob_day'));
$this->session->set('remembered_month', $this->request->get('dob_month'));
$this->session->set('remembered_year', $this->request->get('dob_year'));
$this->session->set('remember_me', "on");
$remember_me = true;
} else {
$this->session->remove('remembered_day');
$this->session->remove('remembered_month');
$this->session->remove('remembered_year');
$this->session->remove('remember_me');
}
// return in an array for validator
return ['dob' => $dob, 'remember' => $remember_me];
}
示例2: check
/**
* Captcha check
*
* @param $value
* @return bool
*/
public function check($value)
{
if (!$this->session->has('captcha')) {
return false;
}
$key = $this->session->get('captcha.key');
if (!$this->session->get('captcha.sensitive')) {
$value = $this->str->lower($value);
}
$this->session->remove('captcha');
return $this->hasher->check($value, $key);
}
示例3: validateCredential
/**
* Called by workerman application<br>
* 检验凭证。 参数是凭证数据。如果检验通过,请返回用户ID;否则返回false
* @param $credential
* @return bool|integer
*/
public function validateCredential($credential)
{
list($sessionId, $token) = $credential;
$sessionId = \Crypt::decrypt($sessionId);
$token = \Crypt::decrypt($token);
$sessStore = new Store($sessionId, \App::make('session')->driver()->getHandler(), $sessionId);
$sessStore->start();
if ($sessStore->has($this->tokenKey)) {
if ($sessStore->get($this->tokenKey) == $token) {
$sessStore->remove($this->tokenKey);
$userIdKey = 'login_' . md5('Illuminate\\Auth\\Guard');
$userId = $sessStore->get($userIdKey);
return $userId;
}
}
return false;
}
示例4: remove
/**
* Removes an attribute.
*
* @param string $name
* @return mixed The removed value or null when it does not exist
* @static
*/
public static function remove($name)
{
return \Illuminate\Session\Store::remove($name);
}
示例5: remove
/**
* {@inheritdoc}
*/
public function remove($key)
{
$this->store->remove($key);
return $this;
}