set() abstract public method

Save the variable item specified by the variable key name into the storage system for current session user.
abstract public set ( string $key, mix $value ) : boolean
$key string Variable key name
$value mix Variable value
return boolean Returns true if the saving operation is success, otherwise returns false
コード例 #1
0
ファイル: Baidu.php プロジェクト: naliduo/ThinkSNS
 /**
  * Lays down a CSRF state token for this process.
  *
  * @return void
  */
 protected function establishCSRFTokenState()
 {
     if ($this->state === null) {
         $this->state = md5(uniqid(mt_rand(), true));
         $this->store->set('state', $this->state);
     }
 }