Documentation

InflateStream
in package
implements StreamInterface Uses StreamDecoratorTrait

Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content.

This stream decorator 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/rfc1950
link
http://tools.ietf.org/html/rfc1952
link
http://php.net/manual/en/filters.compression.php

Interfaces, Classes, Traits and Enums

StreamInterface
Describes a data stream.

Table of Contents

$stream  : StreamInterface
__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()  : string
close()  : void
detach()  : mixed
eof()  : bool
getContents()  : string
getMetadata()  : mixed
{@inheritdoc}
getSize()  : int|null
isReadable()  : bool
isSeekable()  : bool
isWritable()  : bool
read()  : string
rewind()  : void
seek()  : void
tell()  : int
write()  : int
createStream()  : StreamInterface
Implement in subclasses to dynamically create streams when requested.

Properties

Methods

__call()

Allow decorators to implement custom methods

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

getMetadata()

{@inheritdoc}

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

read()

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

seek()

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

write()

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

Search results