Pointable
extends
Stream
in
Interface \Hoa\Stream\IStream\Pointable.
Interface for pointable input/output.
Tags
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
SEEK_END
Set position to end-of-file plus $offset.
public
mixed
SEEK_END
= SEEK_END
Tags
SEEK_SET
Set position equal to $offset bytes.
public
mixed
SEEK_SET
= SEEK_SET
Tags
Methods
getStream()
Get the current stream.
public
getStream() : resource
Return values
resourcerewind()
Rewind the position of a stream pointer.
public
rewind() : bool
Return values
boolseek()
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
inttell()
Get the current position of the stream pointer.
public
tell() : int