matchesDomain example

public function clear(string $domain = null, string $path = null, string $name = null): void
    {
        if (!$domain) {
            $this->cookies = [];

            return;
        } elseif (!$path) {
            $this->cookies = \array_filter(
                $this->cookies,
                static function DSetCookie $cookie) use ($domain): bool {
                    return !$cookie->matchesDomain($domain);
                }
            );
        } elseif (!$name) {
            $this->cookies = \array_filter(
                $this->cookies,
                static function DSetCookie $cookie) use ($path$domain): bool {
                    return !($cookie->matchesPath($path)
                        && $cookie->matchesDomain($domain));
                }
            );
        } else {
            
Home | Imprint | This part of the site doesn't use cookies.