public function expireCookie(ResponseInterface $response, $name)
    {
        $cookie = SetCookie::createExpired($name)
            ->withMaxAge($this->configuration['maxAge'])
            ->withPath($this->configuration['path'])
            ->withDomain($this->configuration['domain'])
            ->withSecure($this->configuration['secure'])
            ->withHttpOnly($this->configuration['httpOnly']);

        return $response->withAddedHeader(static::RESPONSE_COOKIE_NAME, $cookie);
    }
public function expireCookie(ResponseInterface $response, $name)
    {
        $cookie = SetCookie::createExpired($name)
            ->withMaxAge($this->configuration['maxAge'])
            ->withPath($this->configuration['path'])
            ->withDomain($this->configuration['domain'])
            ->withSecure($this->configuration['secure'])
            ->withHttpOnly($this->configuration['httpOnly']);

        return $response->withAddedHeader(static::RESPONSE_COOKIE_NAME, $cookie);
    }
public function expireCookie ( ResponseInterface $ response , $ name ) { $ cookie = SetCookie :: createExpired ( $ name ) -> withMaxAge ( $ this -> configuration [ 'maxAge' ] ) -> withPath ( $ this -> configuration [ 'path' ] ) -> withDomain ( $ this -> configuration [ 'domain' ] ) -> withSecure ( $ this -> configuration [ 'secure' ] ) -> withHttpOnly ( $ this -> configuration [ 'httpOnly' ] ) ; return $ response -> withAddedHeader ( static :: RESPONSE_COOKIE_NAME , $ cookie ) ; }
Expire a cookie in the response.

Do not worry about duplicated cookies, they will be deduped when the
response is rendered by "EncryptedCookieMiddleware".

@param ResponseInterface $response
@param string $name

@return ResponseInterface
Expire a cookie in the response .