Documentation

DroppingStream
in package
implements StreamInterface uses StreamDecoratorTrait

FinalYes

Stream decorator that begins dropping data once the size of the underlying stream becomes too full.

Table of Contents

Interfaces

StreamInterface
Describes a data stream.

Properties

$maxLength  : int
$stream  : StreamInterface

Methods

__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
getSize()  : int|null
isReadable()  : bool
isSeekable()  : bool
isWritable()  : bool
read()  : string
rewind()  : void
seek()  : void
tell()  : int
write()  : int
Write data to the stream.
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>

getMetadata()

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

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

write()

Write data to the stream.

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

The string that is to be written.

Return values
int

Returns the number of bytes written to the stream.


        
On this page

Search results