public function removeMatchingCookies($name = null, $domain = null, $path = null)
    {
        $match = function ($cookie) use ($name, $domain, $path) {
            $match = true;

            if (isset($name)) {
                $match = $match && ($cookie->getName() === $name);
            }

            if (isset($domain)) {
                $match = $match && $cookie->matchDomain($domain);
            }

            if (isset($path)) {
                $match = $match && $cookie->matchPath($path);
            }

            return $match;
        };

        $cookies = $this->findMatchingCookies($match);

        $this->removeCookies($cookies);
    }
public function removeMatchingCookies($name = null, $domain = null, $path = null)
    {
        $match = function ($cookie) use ($name, $domain, $path) {
            $match = true;

            if (isset($name)) {
                $match = $match && ($cookie->getName() === $name);
            }

            if (isset($domain)) {
                $match = $match && $cookie->matchDomain($domain);
            }

            if (isset($path)) {
                $match = $match && $cookie->matchPath($path);
            }

            return $match;
        };

        $cookies = $this->findMatchingCookies($match);

        $this->removeCookies($cookies);
    }
public function removeMatchingCookies ( $ name = null , $ domain = null , $ path = null ) { $ match = function ( $ cookie ) use ( $ name , $ domain , $ path ) { $ match = true ; if ( isset ( $ name ) ) { $ match = $ match && ( $ cookie -> getName ( ) === $ name ) ; } if ( isset ( $ domain ) ) { $ match = $ match && $ cookie -> matchDomain ( $ domain ) ; } if ( isset ( $ path ) ) { $ match = $ match && $ cookie -> matchPath ( $ path ) ; } return $ match ; } ; $ cookies = $ this -> findMatchingCookies ( $ match ) ; $ this -> removeCookies ( $ cookies ) ; }
Removes cookies which match the given parameters.

Null means that parameter should not be matched

@param string|null $name
@param string|null $domain
@param string|null $path
Removes cookies which match the given parameters .