XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Transport_StreamBuffer Class Reference
Inheritance diagram for Swift_Transport_StreamBuffer:
Inheritance graph

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
 

Detailed Description

Definition at line 22 of file StreamBuffer.php.

Constructor & Destructor Documentation

Swift_Transport_StreamBuffer::__construct ( Swift_ReplacementFilterFactory  $replacementFactory)

Create a new StreamBuffer using $replacementFactory for transformations.

Parameters
Swift_ReplacementFilterFactory$replacementFactory

Definition at line 49 of file StreamBuffer.php.

Member Function Documentation

Swift_Transport_StreamBuffer::_commit (   $bytes)
protected

Write this bytes to the stream

Definition at line 206 of file StreamBuffer.php.

References Swift_ByteStream_AbstractFilterableInputStream\$_sequence.

Swift_Transport_StreamBuffer::_establishProcessConnection ( )
private

Opens a process for input/output. private

Definition at line 256 of file StreamBuffer.php.

References $err.

Referenced by initialize().

Here is the caller graph for this function:

Swift_Transport_StreamBuffer::_establishSocketConnection ( )
private

Establishes a connection to a remote server. private

Definition at line 221 of file StreamBuffer.php.

References $_stream.

Referenced by initialize().

Here is the caller graph for this function:

Swift_Transport_StreamBuffer::_flush ( )
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.

Parameters
array$params

Implements Swift_Transport_IoBuffer.

Definition at line 60 of file StreamBuffer.php.

References _establishProcessConnection(), and _establishSocketConnection().

Here is the call graph for this function:

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.

Parameters
int$length
Returns
string

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.

Parameters
int$sequenceof last write to scan from
Returns
string

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).

Parameters
string$param
mixed$value

Implements Swift_Transport_IoBuffer.

Definition at line 80 of file StreamBuffer.php.

Swift_Transport_StreamBuffer::setReadPointer (   $byteOffset)

Not implemented

Implements Swift_OutputByteStream.

Definition at line 190 of file StreamBuffer.php.

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.

Parameters
string[]$replacements

Implements Swift_Transport_IoBuffer.

Definition at line 133 of file StreamBuffer.php.

References Swift_ByteStream_AbstractFilterableInputStream\addFilter(), and Swift_ByteStream_AbstractFilterableInputStream\removeFilter().

Here is the call graph for this function:

Swift_Transport_StreamBuffer::terminate ( )

Perform any shutdown logic needed.

Implements Swift_Transport_IoBuffer.

Definition at line 106 of file StreamBuffer.php.

Member Data Documentation

Swift_Transport_StreamBuffer::$_in
private

The input stream

Definition at line 31 of file StreamBuffer.php.

Swift_Transport_StreamBuffer::$_out
private

The output stream

Definition at line 34 of file StreamBuffer.php.

Swift_Transport_StreamBuffer::$_params = array()
private

Buffer initialization parameters

Definition at line 37 of file StreamBuffer.php.

Swift_Transport_StreamBuffer::$_replacementFactory
private

The ReplacementFilterFactory

Definition at line 40 of file StreamBuffer.php.

Swift_Transport_StreamBuffer::$_stream
private

A primary socket

Definition at line 28 of file StreamBuffer.php.

Referenced by _establishSocketConnection().

Swift_Transport_StreamBuffer::$_translations = array()
private

Translations performed on data being streamed into the buffer

Definition at line 43 of file StreamBuffer.php.


The documentation for this class was generated from the following file: