public function withExpires(ResponseInterface $response, $time)
    {
        if (!is_integer($time)) {
            $time = strtotime($time);
            if ($time === false) {
                throw new InvalidArgumentException('Expiration value could not be parsed with `strtotime()`.');
            }
        }

        return $response->withHeader('Expires', gmdate('D, d M Y H:i:s T', $time));
    }
public function withExpires(ResponseInterface $response, $time)
    {
        if (!is_integer($time)) {
            $time = strtotime($time);
            if ($time === false) {
                throw new InvalidArgumentException('Expiration value could not be parsed with `strtotime()`.');
            }
        }

        return $response->withHeader('Expires', gmdate('D, d M Y H:i:s T', $time));
    }
public function withExpires ( ResponseInterface $ response , $ time ) { if ( ! is_integer ( $ time ) ) { $ time = strtotime ( $ time ) ; if ( $ time === false ) { throw new InvalidArgumentException ( 'Expiration value could not be parsed with `strtotime()`.' ) ; } } return $ response -> withHeader ( 'Expires' , gmdate ( 'D, d M Y H:i:s T' , $ time ) ) ; }
Add `Expires` header to PSR7 response object

@param  ResponseInterface $response A PSR7 response object
@param  int|string        $time     A UNIX timestamp or a valid `strtotime()` string

@return ResponseInterface           A new PSR7 response object with `Expires` header
@throws InvalidArgumentException if the expiration date cannot be parsed
Add Expires header to PSR7 response object