Documentation

Gzip
in package
implements MiddlewareInterface

Filter to gzip content before being served

Tags
author

James Pepin james@bluestatedigital.com

author

Ralf Lang lang@b1-systems.de

category

Horde

copyright

2008-2021 Horde LLC

license

http://www.horde.org/licenses/bsd BSD

Table of Contents

Interfaces

MiddlewareInterface

Properties

$streamFactory  : StreamFactoryInterface

Methods

__construct()  : mixed
process()  : ResponseInterface
Compress output stream and set header
_byteCount()  : int
If mbstring is set to overload str* function then we could be counting multi-byte chars as single bytes so we need to treat the string like its 8-bit encoded to get an accurate byte count.

Properties

$streamFactory

private StreamFactoryInterface $streamFactory

Methods

__construct()

public __construct(StreamFactoryInterface $streamFactory) : mixed
Parameters
$streamFactory : StreamFactoryInterface

process()

Compress output stream and set header

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

_byteCount()

If mbstring is set to overload str* function then we could be counting multi-byte chars as single bytes so we need to treat the string like its 8-bit encoded to get an accurate byte count.

protected _byteCount(string $string) : int
Parameters
$string : string
Return values
int

        
On this page

Search results