Example #1
0
 /**
  * Set cookie
  *
  * @return void
  */
 protected function setCookie()
 {
     if (!headers_sent() && 'cli' != PHP_SAPI) {
         $arg = $this->getName();
         $httpDomain = $this->getCookieDomain();
         $httpsDomain = $this->getCookieDomain(true);
         $ttl = static::getTTL();
         setcookie($arg, $this->session->getSid(), $ttl, $this->getCookiePath(), $httpDomain, false, true);
         if ($httpDomain != $httpsDomain) {
             setcookie($arg, $this->session->getSid(), $ttl, $this->getCookiePath(true), $httpsDomain, false, true);
         }
         $this->setLCRefererCookie();
     }
 }
Example #2
0
 /**
  * Get public session id
  *
  * @return string
  */
 public function getID()
 {
     return $this->session->getSid();
 }
 /**
  * {@inheritDoc}
  */
 public function getSid()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSid', array());
     return parent::getSid();
 }