public function delete($key, array $options = []) {
		$cookieClass = get_called_class();

		return function($params) use ($cookieClass) {
			$key = $params['key'];
			$path = '/' . str_replace('.', '/', $this->_config['name'] . '.' . $key) . '/.';
			$cookies = current(Set::extract($_COOKIE, $path));
			if (is_array($cookies)) {
				$cookies = array_keys(Set::flatten($cookies));
				foreach ($cookies as &$name) {
					$name = $key . '.' . $name;
				}
			} else {
				$cookies = [$key];
			}
			foreach ($cookies as &$name) {
				$result = setcookie(
					$cookieClass::keyFormat($name, $this->_config),
					"",
					1,
					$this->_config['path'],
					$this->_config['domain'],
					$this->_config['secure'],
					$this->_config['httponly']
				);
				if (!$result) {
					throw new RuntimeException("There was an error deleting {$name} cookie.");
				}
			}
			return true;
		};
	}
public function delete($key, array $options = []) {
		$cookieClass = get_called_class();

		return function($params) use ($cookieClass) {
			$key = $params['key'];
			$path = '/' . str_replace('.', '/', $this->_config['name'] . '.' . $key) . '/.';
			$cookies = current(Set::extract($_COOKIE, $path));
			if (is_array($cookies)) {
				$cookies = array_keys(Set::flatten($cookies));
				foreach ($cookies as &$name) {
					$name = $key . '.' . $name;
				}
			} else {
				$cookies = [$key];
			}
			foreach ($cookies as &$name) {
				$result = setcookie(
					$cookieClass::keyFormat($name, $this->_config),
					"",
					1,
					$this->_config['path'],
					$this->_config['domain'],
					$this->_config['secure'],
					$this->_config['httponly']
				);
				if (!$result) {
					throw new RuntimeException("There was an error deleting {$name} cookie.");
				}
			}
			return true;
		};
	}
public function delete ( $ key , array $ options = [ ] ) { $ cookieClass = get_called_class ( ) ; return function ( $ params ) use ( $ cookieClass ) { $ key = $ params [ 'key' ] ; $ path = '/' . str_replace ( '.' , '/' , $ this -> _config [ 'name' ] . '.' . $ key ) . '/.' ; $ cookies = current ( Set :: extract ( $ _COOKIE , $ path ) ) ; if ( is_array ( $ cookies ) ) { $ cookies = array_keys ( Set :: flatten ( $ cookies ) ) ; foreach ( $ cookies as & $ name ) { $ name = $ key . '.' . $ name ; } } else { $ cookies = [ $ key ] ; } foreach ( $ cookies as & $ name ) { $ result = setcookie ( $ cookieClass :: keyFormat ( $ name , $ this -> _config ) , "" , 1 , $ this -> _config [ 'path' ] , $ this -> _config [ 'domain' ] , $ this -> _config [ 'secure' ] , $ this -> _config [ 'httponly' ] ) ; if ( ! $ result ) { throw new RuntimeException ( "There was an error deleting {$name} cookie." ) ; } } return true ; } ; }
Delete a value from the cookie store.

@param string $key The key to be deleted from the cookie store.
@param array $options Options array.
@return \Closure Function returning boolean `true` on successful delete, `false` otherwise.
Delete a value from the cookie store .