Bufferable
extends
Stream
in
Interface \Hoa\Stream\IStream\Bufferable.
Interface for bufferable streams. It's complementary to native buffer support of Hoa\Stream (please, see StreamBuffer() methods). Classes implementing this interface are able to create nested buffers, flush them etc.
Tags
Table of Contents
Methods
- deleteBuffer() : bool
- Delete buffer.
- flush() : void
- Flush the buffer.
- getBufferLevel() : int
- Get bufffer level.
- getBufferSize() : int
- Get buffer size.
- getStream() : resource
- Get the current stream.
- newBuffer() : int
- Start a new buffer.
Methods
deleteBuffer()
Delete buffer.
public
deleteBuffer() : bool
Return values
boolflush()
Flush the buffer.
public
flush() : void
getBufferLevel()
Get bufffer level.
public
getBufferLevel() : int
Return values
intgetBufferSize()
Get buffer size.
public
getBufferSize() : int
Return values
intgetStream()
Get the current stream.
public
getStream() : resource
Return values
resourcenewBuffer()
Start a new buffer.
public
newBuffer([mixed $callable = null ][, int $size = null ]) : int
The callable acts like a light filter.
Parameters
- $callable : mixed = null
-
Callable.
- $size : int = null
-
Size.