Class Swift_Transport_StreamBuffer
Inheritance | Swift_Transport_StreamBuffer » Swift_ByteStream_AbstractFilterableInputStream |
---|---|
Implements | Swift_Filterable, Swift_InputByteStream, Swift_Transport_IoBuffer |
A generic IoBuffer implementation supporting remote sockets and local processes.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$_sequence | Write sequence. | Swift_ByteStream_AbstractFilterableInputStream |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Create a new StreamBuffer using $replacementFactory for transformations. | Swift_Transport_StreamBuffer |
addFilter() | Add a StreamFilter to this InputByteStream. | Swift_ByteStream_AbstractFilterableInputStream |
bind() | Attach $is to this stream. | Swift_ByteStream_AbstractFilterableInputStream |
commit() | For any bytes that are currently buffered inside the stream, force them off the buffer. | Swift_ByteStream_AbstractFilterableInputStream |
flushBuffers() | Flush the contents of the stream (empty it) and set the internal pointer to the beginning. | Swift_ByteStream_AbstractFilterableInputStream |
initialize() | Perform any initialization needed, using the given $params. | Swift_Transport_StreamBuffer |
read() | Reads $length bytes from the stream into a string and moves the pointer through the stream by $length. | Swift_Transport_StreamBuffer |
readLine() | Get a line of output (including any CRLF). | Swift_Transport_StreamBuffer |
removeFilter() | Remove an already present StreamFilter based on its $key. | Swift_ByteStream_AbstractFilterableInputStream |
setParam() | Set an individual param on the buffer (e.g. switching to SSL). | Swift_Transport_StreamBuffer |
setReadPointer() | Not implemented | Swift_Transport_StreamBuffer |
setWriteTranslations() | Set an array of string replacements which should be made on data written to the buffer. | Swift_Transport_StreamBuffer |
startTLS() | Swift_Transport_StreamBuffer | |
terminate() | Perform any shutdown logic needed. | Swift_Transport_StreamBuffer |
unbind() | Remove an already bound stream. | Swift_ByteStream_AbstractFilterableInputStream |
write() | Writes $bytes to the end of the stream. | Swift_ByteStream_AbstractFilterableInputStream |
Protected Methods
Method | Description | Defined By |
---|---|---|
_commit() | Write this bytes to the stream | Swift_Transport_StreamBuffer |
_flush() | Flush the stream contents | Swift_Transport_StreamBuffer |
Method Details
Create a new StreamBuffer using $replacementFactory for transformations.
public void __construct ( Swift_ReplacementFilterFactory $replacementFactory ) | ||
$replacementFactory | Swift_ReplacementFilterFactory |
Write this bytes to the stream
protected void _commit ( $bytes ) | ||
$bytes |
Flush the stream contents
protected void _flush ( ) |
Perform any initialization needed, using the given $params.
Parameters will vary depending upon the type of IoBuffer used.
public void initialize ( array $params ) | ||
$params | array |
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.
public string|bool read ( $length ) | ||
$length | int | |
throws | Swift_IoException |
---|
Get a line of output (including any CRLF).
The $sequence number comes from any writes and may or may not be used depending upon the implementation.
public string readLine ( $sequence ) | ||
$sequence | int | Of last write to scan from |
throws | Swift_IoException |
---|
Set an individual param on the buffer (e.g. switching to SSL).
public void setParam ( $param, $value ) | ||
$param | string | |
$value | mixed |
Not implemented
public void setReadPointer ( $byteOffset ) | ||
$byteOffset |
Set an array of string replacements which should be made on data written to the buffer.
This could replace LF with CRLF for example.
public void setWriteTranslations ( array $replacements ) | ||
$replacements | string[] |
public void startTLS ( ) |
Perform any shutdown logic needed.
public void terminate ( ) |