/** * Unset a value from the container using a provided key * @param string $key * The key to identify the item to unset */ public function offsetUnset($key) { $values = array_replace($this->defaults, ['value' => '', 'expires' => time() - 86400]); $this->fresh->offsetSet($key, $this->create('FreshCookie', [$values])); $this->existing->offsetUnset($key); }
/** * Unset a value from the container using a provided key * @param string $key * The key to identify the item to unset */ public function offsetUnset($key) { if (isset($this->keys[$key])) { if (isset($this->factories[parent::offsetGet($key)])) { unset($this->factories[parent::offsetGet($key)]); } parent::offsetUnset($key); } }