Example #1
0
 /**
  * Set a cookie
  *
  * @param HttpCookie $aCookie
  *            The cookie to set
  *            
  * @return boolean
  */
 public function setCookie(HttpCookie $aCookie)
 {
     assert('$aCookie->getPath() !== null && $aCookie->getPath() !== ""');
     $result = setcookie($aCookie->getName(), self::encode($aCookie->getValue()), $aCookie->getExpire(), $aCookie->getPath(), $aCookie->getDomain(), $aCookie->getSecure(), $aCookie->getHttponly());
     if ($result === true) {
         $this->storedCookies[$aCookie->getName()] = $aCookie;
     }
     return $result;
 }