class ChainedBlockStream (View source)

Properties

OLE $ole The OLE container of the file that is being read.
array $params Parameters specified by fopen().
string $data The binary data of the file.
int $pos The file pointer.

Methods

bool
stream_open(string $path, string $mode, int $options, string $openedPath)

Implements support for fopen().

stream_close()

Implements support for fclose().

string
stream_read(int $count)

Implements support for fread(), fgets() etc.

bool
stream_eof()

Implements support for feof().

int
stream_tell()

Returns the position of the file pointer, i.e. its offset into the file stream. Implements support for ftell().

bool
stream_seek(int $offset, int $whence)

Implements support for fseek().

array
stream_stat()

Implements support for fstat(). Currently the only supported field is "size".

Details

bool stream_open(string $path, string $mode, int $options, string $openedPath)

Implements support for fopen().

For creating streams using this wrapper, use OLE_PPS_File::getStream().

Parameters

string $path resource name including scheme, e.g. ole-chainedblockstream://oleInstanceId=1
string $mode only "r" is supported
int $options mask of STREAM_REPORT_ERRORS and STREAM_USE_PATH
string $openedPath &$openedPath absolute path of the opened stream (out parameter)

Return Value

bool true on success

stream_close()

Implements support for fclose().

string stream_read(int $count)

Implements support for fread(), fgets() etc.

Parameters

int $count maximum number of bytes to read

Return Value

string

bool stream_eof()

Implements support for feof().

Return Value

bool TRUE if the file pointer is at EOF; otherwise FALSE

int stream_tell()

Returns the position of the file pointer, i.e. its offset into the file stream. Implements support for ftell().

Return Value

int

bool stream_seek(int $offset, int $whence)

Implements support for fseek().

Parameters

int $offset byte offset
int $whence SEEK_SET, SEEK_CUR or SEEK_END

Return Value

bool

array stream_stat()

Implements support for fstat(). Currently the only supported field is "size".

Return Value

array