InputInterface
in
Input byte stream interface
Tags
Table of Contents
- bind() : mixed
- Attach $is to this stream.
- commit() : mixed
- For any bytes that are currently buffered inside the stream, force them off the buffer.
- flushBuffers() : mixed
- Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
- unbind() : mixed
- Remove an already bound stream.
- write() : int
- Writes $bytes to the end of the stream.
Methods
bind()
Attach $is to this stream.
public
bind(InputInterface $is) : mixed
The stream acts as an observer, receiving all data that is written. All and operations will be mirrored.
Parameters
- $is : InputInterface
Return values
mixed —commit()
For any bytes that are currently buffered inside the stream, force them off the buffer.
public
commit() : mixed
Tags
Return values
mixed —flushBuffers()
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public
flushBuffers() : mixed
Tags
Return values
mixed —unbind()
Remove an already bound stream.
public
unbind(InputInterface $is) : mixed
If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.
Parameters
- $is : InputInterface
Return values
mixed —write()
Writes $bytes to the end of the stream.
public
write(string $bytes) : int
Writing may not happen immediately if the stream chooses to buffer. If you want to write these bytes with immediate effect, call after calling write().
This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).
Parameters
- $bytes : string