public function clear($domain = null, $path = null, $name = null)
    {
        if (!$domain) {
            $this->_data = [];
            return;
        } elseif (!$path) {
            $this->_data = array_filter(
                $this->_data,
                function ($cookie) use ($path, $domain) {
                    return !$cookie->matchesDomain($domain);
                }
            );
        } elseif (!$name) {
            $this->_data = array_filter(
                $this->_data,
                function ($cookie) use ($path, $domain) {
                    return !($cookie->matchesPath($path) &&
                        $cookie->matchesDomain($domain));
                }
            );
        } else {
            $this->_data = array_filter(
                $this->_data,
                function ($cookie) use ($path, $domain, $name) {
                    return !($cookie->name() == $name &&
                        $cookie->matchesPath($path) &&
                        $cookie->matchesDomain($domain));
                }
            );
        }
        return $this;
    }