public function deleteCookie(CookieInterface $Cookie) { $Cookie->setValue(''); $Cookie->setMaxAge(-1); $this->cookies[$Cookie->getName()] = $Cookie; return $this; }
public function __construct(CookieInterface $cookie, &$target_array = null) { $name = $cookie->getName(); // Empty cookie itself $cookie->setValue(null); // Un-populate current superglobals if (is_array($target_array)) { unset($target_array[$name]); } else { unset($_COOKIE[$name]); } // Unset over HTTP setcookie($name, null, -1); }