Documentation

Stream
in package

AbstractYes

Abstract streaming class.

Table of Contents

Properties

$_length  : int
The length of the stream.
$_stream  : mixed
The stream descriptor.

Methods

__construct()  : mixed
Constructor.
__destruct()  : mixed
Destructor.
__get()  : mixed
Getter.
close()  : void
Close the stream.
flush()  : void
Save changes.
Read()  : bool|string
Read from the stream.
ReadLine()  : bool|string
Read a line from the stream.
Seek()  : void
Move the position.
Write()  : int|bool
Write to the stream.
WriteLine()  : bool|int
Write a line to the stream.

Properties

$_length

The length of the stream.

protected int $_length = 0

$_stream

The stream descriptor.

protected mixed $_stream

Methods

__construct()

Constructor.

public __construct() : mixed

__destruct()

Destructor.

public __destruct() : mixed

__get()

Getter.

public __get(string $property) : mixed
Parameters
$property : string

The property.

close()

Close the stream.

public abstract close() : void

flush()

Save changes.

public abstract flush() : void

Read()

Read from the stream.

public abstract Read([int|null $offset = null ][, int|null $count = null ]) : bool|string
Parameters
$offset : int|null = null

Where to start reading from.

$count : int|null = null

The number of bytes to read.

Return values
bool|string

ReadLine()

Read a line from the stream.

public abstract ReadLine() : bool|string
Return values
bool|string

Seek()

Move the position.

public abstract Seek([int $offset = 0 ]) : void
Parameters
$offset : int = 0

The position to move to.

Write()

Write to the stream.

public abstract Write(string $content[, int|null $offset = null ]) : int|bool
Parameters
$content : string

The content to write.

$offset : int|null = null

Where to write from.

Return values
int|bool

WriteLine()

Write a line to the stream.

public abstract WriteLine(string $string) : bool|int
Parameters
$string : string

The content to write.

Return values
bool|int

        
On this page

Search results