Documentation

InflateStream
in package
implements StreamInterface Uses StreamDecoratorTrait

Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.

This stream decorator skips the first 10 bytes of the given stream to remove the gzip header, converts the provided stream to a PHP stream resource, then appends the zlib.inflate filter. The stream is then converted back to a Guzzle stream resource to be used as a Guzzle stream.

Tags
link
http://tools.ietf.org/html/rfc1952
link
http://php.net/manual/en/filters.compression.php
final

Interfaces, Classes and Traits

StreamInterface
Describes a data stream.

Table of Contents

__call()  : mixed
Allow decorators to implement custom methods
__construct()  : mixed
__get()  : StreamInterface
Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).
__toString()  : mixed
close()  : mixed
detach()  : mixed
eof()  : mixed
getContents()  : mixed
getMetadata()  : mixed
getSize()  : mixed
isReadable()  : mixed
isSeekable()  : mixed
isWritable()  : mixed
read()  : mixed
rewind()  : mixed
seek()  : mixed
tell()  : mixed
write()  : mixed
createStream()  : StreamInterface
Implement in subclasses to dynamically create streams when requested.
getLengthOfPossibleFilenameHeader()  : int

Methods

__call()

Allow decorators to implement custom methods

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string

Missing method name

$args : array<string|int, mixed>

Method arguments

Return values
mixed

__get()

Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).

public __get(string $name) : StreamInterface
Parameters
$name : string

Name of the property (allows "stream" only).

Return values
StreamInterface

getMetadata()

public getMetadata([mixed $key = null ]) : mixed
Parameters
$key : mixed = null
Return values
mixed

read()

public read(mixed $length) : mixed
Parameters
$length : mixed
Return values
mixed

seek()

public seek(mixed $offset[, mixed $whence = SEEK_SET ]) : mixed
Parameters
$offset : mixed
$whence : mixed = SEEK_SET
Return values
mixed

write()

public write(mixed $string) : mixed
Parameters
$string : mixed
Return values
mixed

Search results