final class CallbackStream implements StreamInterface (View source)

Methods

__construct(Closure $producer)
from(callable $producer)
string
string
void
close()
void
detach()
int|null
int|null
int
tell()
int
bool
eof()
bool
bool
bool
void
seek(int $offset, int $whence = SEEK_SET)
void
void
rewind()
void
bool
bool
int
write(string $string)
int
bool
bool
string
read(int $length)
string
string
string
mixed
getMetadata(string|null $key = null)
mixed

Details

__construct

__construct(Closure $producer)

No description

Parameters

Closure $producer

from

static CallbackStream from(callable $producer)

No description

Parameters

callable $producer

Return Value

CallbackStream

__toString

string __toString()

No description

Return Value

string

close

void close()

No description

Return Value

void

detach

detach()

No description

getSize

int|null getSize()

No description

Return Value

int|null

tell

int tell()

No description

Return Value

int

eof

bool eof()

No description

Return Value

bool

isSeekable

bool isSeekable()

No description

Return Value

bool

seek

void seek(int $offset, int $whence = SEEK_SET)

No description

Parameters

int $offset
int $whence

Return Value

void

rewind

void rewind()

No description

Return Value

void

isWritable

bool isWritable()

No description

Return Value

bool

write

int write(string $string)

No description

Parameters

string $string

Return Value

int

isReadable

bool isReadable()

No description

Return Value

bool

read

string read(int $length)

No description

Parameters

int $length

Return Value

string

getContents

string getContents()

No description

Return Value

string

getMetadata

mixed getMetadata(string|null $key = null)

No description

Parameters

string|null $key

Return Value

mixed