XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_ReplacementFilterFactory $replacementFactory) | |
initialize (array $params) | |
read ($length) | |
readLine ($sequence) | |
setParam ($param, $value) | |
setReadPointer ($byteOffset) | |
setWriteTranslations (array $replacements) | |
terminate () | |
Public Member Functions inherited from Swift_ByteStream_AbstractFilterableInputStream | |
addFilter (Swift_StreamFilter $filter, $key) | |
bind (Swift_InputByteStream $is) | |
commit () | |
flushBuffers () | |
removeFilter ($key) | |
unbind (Swift_InputByteStream $is) | |
write ($bytes) | |
Protected Member Functions | |
_commit ($bytes) | |
_flush () | |
Protected Member Functions inherited from Swift_ByteStream_AbstractFilterableInputStream | |
_commit ($bytes) | |
_flush () | |
Private Member Functions | |
_establishProcessConnection () | |
_establishSocketConnection () | |
Private Attributes | |
$_in | |
$_out | |
$_params = array() | |
$_replacementFactory | |
$_stream | |
$_translations = array() | |
Additional Inherited Members | |
Public Attributes inherited from Swift_Transport_IoBuffer | |
const | TYPE_PROCESS = 0x0010 |
const | TYPE_SOCKET = 0x0001 |
Definition at line 22 of file StreamBuffer.php.
Swift_Transport_StreamBuffer::__construct | ( | Swift_ReplacementFilterFactory | $replacementFactory | ) |
Create a new StreamBuffer using $replacementFactory for transformations.
Swift_ReplacementFilterFactory | $replacementFactory |
Definition at line 49 of file StreamBuffer.php.
|
protected |
Write this bytes to the stream
Definition at line 206 of file StreamBuffer.php.
References Swift_ByteStream_AbstractFilterableInputStream\$_sequence.
|
private |
Opens a process for input/output. private
Definition at line 256 of file StreamBuffer.php.
References $err.
Referenced by initialize().
|
private |
Establishes a connection to a remote server. private
Definition at line 221 of file StreamBuffer.php.
References $_stream.
Referenced by initialize().
|
protected |
Flush the stream contents
Definition at line 197 of file StreamBuffer.php.
Swift_Transport_StreamBuffer::initialize | ( | array | $params | ) |
Perform any initialization needed, using the given $params. Parameters will vary depending upon the type of IoBuffer used.
array | $params |
Implements Swift_Transport_IoBuffer.
Definition at line 60 of file StreamBuffer.php.
References _establishProcessConnection(), and _establishSocketConnection().
Swift_Transport_StreamBuffer::read | ( | $length | ) |
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.
int | $length |
Implements Swift_OutputByteStream.
Definition at line 180 of file StreamBuffer.php.
References $ret.
Swift_Transport_StreamBuffer::readLine | ( | $sequence | ) |
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.
int | $sequence | of last write to scan from |
Implements Swift_Transport_IoBuffer.
Definition at line 163 of file StreamBuffer.php.
Swift_Transport_StreamBuffer::setParam | ( | $param, | |
$value | |||
) |
Set an individual param on the buffer (e.g. switching to SSL).
string | $param | |
mixed | $value |
Implements Swift_Transport_IoBuffer.
Definition at line 80 of file StreamBuffer.php.
Swift_Transport_StreamBuffer::setReadPointer | ( | $byteOffset | ) |
Swift_Transport_StreamBuffer::setWriteTranslations | ( | array | $replacements | ) |
Set an array of string replacements which should be made on data written to the buffer. This could replace LF with CRLF for example.
string[] | $replacements |
Implements Swift_Transport_IoBuffer.
Definition at line 133 of file StreamBuffer.php.
References Swift_ByteStream_AbstractFilterableInputStream\addFilter(), and Swift_ByteStream_AbstractFilterableInputStream\removeFilter().
Swift_Transport_StreamBuffer::terminate | ( | ) |
Perform any shutdown logic needed.
Implements Swift_Transport_IoBuffer.
Definition at line 106 of file StreamBuffer.php.
|
private |
The input stream
Definition at line 31 of file StreamBuffer.php.
|
private |
The output stream
Definition at line 34 of file StreamBuffer.php.
|
private |
Buffer initialization parameters
Definition at line 37 of file StreamBuffer.php.
|
private |
The ReplacementFilterFactory
Definition at line 40 of file StreamBuffer.php.
|
private |
A primary socket
Definition at line 28 of file StreamBuffer.php.
Referenced by _establishSocketConnection().
|
private |
Translations performed on data being streamed into the buffer
Definition at line 43 of file StreamBuffer.php.