Documentation

Pointable extends Stream

Interface \Hoa\Stream\IStream\Pointable.

Interface for pointable input/output.

Tags
copyright

Copyright © 2007-2017 Hoa community

license

New BSD License

Table of Contents

Constants

SEEK_CURRENT  = SEEK_CUR
Set position to current location plus $offset.
SEEK_END  = SEEK_END
Set position to end-of-file plus $offset.
SEEK_SET  = SEEK_SET
Set position equal to $offset bytes.

Methods

getStream()  : resource
Get the current stream.
rewind()  : bool
Rewind the position of a stream pointer.
seek()  : int
Seek on a stream pointer.
tell()  : int
Get the current position of the stream pointer.

Constants

SEEK_CURRENT

Set position to current location plus $offset.

public mixed SEEK_CURRENT = SEEK_CUR
Tags
const

int

SEEK_END

Set position to end-of-file plus $offset.

public mixed SEEK_END = SEEK_END
Tags
const

int

SEEK_SET

Set position equal to $offset bytes.

public mixed SEEK_SET = SEEK_SET
Tags
const

int

Methods

getStream()

Get the current stream.

public getStream() : resource
Return values
resource

rewind()

Rewind the position of a stream pointer.

public rewind() : bool
Return values
bool

seek()

Seek on a stream pointer.

public seek(int $offset[, int $whence = self::SEEK_SET ]) : int
Parameters
$offset : int

Offset (negative value should be supported).

$whence : int = self::SEEK_SET

Whence, use the self::SEEK_* constants.

Return values
int

tell()

Get the current position of the stream pointer.

public tell() : int
Return values
int

        
On this page

Search results