src/Http/Cookie/Cookies.php
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;
    }
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;
    }
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 ; }
Remove some cookies from the Jar.

@param  string  $domain A domain name.
@param  string  $path   A path name.
@param  string  $name   A cookie name.
@return self
Remove some cookies from the Jar .