Пример #1
0
 /**
  * @param string $name
  * @param mixed  $value
  * @param int    $expire
  * @param string $path
  * @param bool   $secure
  * @param string $domain
  * @param bool   $httpOnly
  * @return PhalconCookies
  */
 public static function set($name, $value = null, $expire = 0, $path = null, $secure = null, $domain = null, $httpOnly = null)
 {
     $options = static::$options;
     $path === null and $path = $options['path'];
     $domain === null and $domain = $options['domain'];
     return static::$cookies->set($name, $value, $expire, $path, $secure, $domain, $httpOnly);
 }
Пример #2
0
 public function set($name, $value = null, $expire = 0, $path = "/", $secure = null, $domain = null, $httpOnly = null)
 {
     if ($this->isUsingEncryption()) {
         $value = base64_encode($value);
     }
     return parent::set($name, $value, $expire, $path, $secure, $domain, $httpOnly);
 }
Пример #3
0
 /**
  * @param string $name
  * @param null $value
  * @param int $expire
  * @param string $path
  * @param null $secure
  * @param null $domain
  * @param null $httpOnly
  * @return \Phalcon\Http\Response\Cookies
  */
 public function set($name, $value = null, $expire = 0, $path = "/", $secure = null, $domain = null, $httpOnly = null)
 {
     $name = isset($this->options['prefix']) ? $this->options['prefix'] . $name : $name;
     $expire = $expire === 0 ? isset($this->options['expire']) ? time() + $this->options['expire'] : 0 : $expire;
     $path = $path === '/' ? isset($this->options['path']) ? $this->options['path'] : '/' : $path;
     $domain = $domain === null ? isset($this->options['domain']) ? $this->options['domain'] : null : $domain;
     $secure = $secure === null ? isset($this->options['secure']) ? $this->options['secure'] : null : $secure;
     $httpOnly = $httpOnly === null ? isset($this->options['httpOnly']) ? $this->options['httpOnly'] : null : $httpOnly;
     return parent::set($name, $value, $expire, $path, $secure, $domain, $httpOnly);
 }
Пример #4
0
 public function set($name, $value = null, $expire = 0, $path = "/", $secure = null, $domain = null, $httpOnly = null)
 {
     return parent::set($name, $value, $expire, $path, $secure, $domain, $httpOnly);
 }
Пример #5
0
 public static function deleteCookies(Cookies $cookies)
 {
     $cookies->set(RememberTokens::USER_COOKIE_KEY, null, 0);
     $cookies->set(RememberTokens::TOKEN_COOKIE_KEY, null, 0);
     $cookies->send();
 }