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

Public Member Functions

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

Private Member Functions

 _doWrite ($bytes)
 
 _filter ($bytes)
 

Private Attributes

 $_filters = array()
 
 $_mirrors = array()
 
 $_sequence = 0
 
 $_writeBuffer = ''
 

Detailed Description

Definition at line 21 of file AbstractFilterableInputStream.php.

Member Function Documentation

Swift_ByteStream_AbstractFilterableInputStream::_commit (   $bytes)
abstractprotected

Commit the given bytes to the storage medium immediately.

Parameters
string$bytesprotected

Referenced by _doWrite().

Here is the caller graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::_doWrite (   $bytes)
private

Just write the bytes to the stream

Definition at line 166 of file AbstractFilterableInputStream.php.

References _commit(), and _filter().

Referenced by commit(), flushBuffers(), and write().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::_filter (   $bytes)
private

Run $bytes through all filters

Definition at line 156 of file AbstractFilterableInputStream.php.

Referenced by _doWrite(), and unbind().

Here is the caller graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::_flush ( )
abstractprotected

Flush any buffers/content with immediate effect. protected

Referenced by flushBuffers().

Here is the caller graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::addFilter ( Swift_StreamFilter  $filter,
  $key 
)

Add a StreamFilter to this InputByteStream.

Parameters
Swift_StreamFilter$filter
string$key

Implements Swift_Filterable.

Definition at line 55 of file AbstractFilterableInputStream.php.

Referenced by Swift_Transport_StreamBuffer\setWriteTranslations().

Here is the caller graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::bind ( Swift_InputByteStream  $is)

Attach $is to this stream. The stream acts as an observer, receiving all data that is written. All write() and flushBuffers() operations will be mirrored.

Parameters
Swift_InputByteStream$is

Implements Swift_InputByteStream.

Definition at line 106 of file AbstractFilterableInputStream.php.

Swift_ByteStream_AbstractFilterableInputStream::commit ( )

For any bytes that are currently buffered inside the stream, force them off the buffer.

Exceptions
Swift_IoException

Implements Swift_InputByteStream.

Definition at line 94 of file AbstractFilterableInputStream.php.

References _doWrite().

Here is the call graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::flushBuffers ( )

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.

Exceptions
Swift_IoException

Implements Swift_InputByteStream.

Definition at line 139 of file AbstractFilterableInputStream.php.

References _doWrite(), and _flush().

Here is the call graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::removeFilter (   $key)

Remove an already present StreamFilter based on its $key.

Parameters
string$key

Implements Swift_Filterable.

Definition at line 64 of file AbstractFilterableInputStream.php.

Referenced by Swift_Transport_StreamBuffer\setWriteTranslations().

Here is the caller graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::unbind ( Swift_InputByteStream  $is)

Remove an already bound stream. 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
Swift_InputByteStream$is

Implements Swift_InputByteStream.

Definition at line 119 of file AbstractFilterableInputStream.php.

References _filter().

Here is the call graph for this function:

Swift_ByteStream_AbstractFilterableInputStream::write (   $bytes)

Writes $bytes to the end of the stream.

Parameters
string$bytes
Exceptions
Swift_IoException

Implements Swift_InputByteStream.

Definition at line 74 of file AbstractFilterableInputStream.php.

References $_sequence, and _doWrite().

Here is the call graph for this function:

Member Data Documentation

Swift_ByteStream_AbstractFilterableInputStream::$_filters = array()
private

StreamFilters

Definition at line 29 of file AbstractFilterableInputStream.php.

Swift_ByteStream_AbstractFilterableInputStream::$_mirrors = array()
private

Bound streams

Definition at line 35 of file AbstractFilterableInputStream.php.

Swift_ByteStream_AbstractFilterableInputStream::$_sequence = 0
private

Write sequence

Definition at line 26 of file AbstractFilterableInputStream.php.

Referenced by Swift_Transport_StreamBuffer\_commit(), and write().

Swift_ByteStream_AbstractFilterableInputStream::$_writeBuffer = ''
private

A buffer for writing

Definition at line 32 of file AbstractFilterableInputStream.php.


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