Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_Transport_StreamBuffer

Source Location: /vendors/swift/classes/Swift/Transport/StreamBuffer.php

Class Overview

Swift_ByteStream_AbstractFilterableInputStream
   |
   --Swift_Transport_StreamBuffer

A generic IoBuffer implementation supporting remote sockets and local processes.


Author(s):

  • Chris Corbyn

Implements interfaces:

Methods


Inherited Methods

Class: Swift_ByteStream_AbstractFilterableInputStream

Swift_ByteStream_AbstractFilterableInputStream::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::removeFilter()
Remove an already present StreamFilter based on its $key.
Swift_ByteStream_AbstractFilterableInputStream::unbind()
Remove an already bound stream.
Swift_ByteStream_AbstractFilterableInputStream::write()
Writes $bytes to the end of the stream.
Swift_ByteStream_AbstractFilterableInputStream::_commit()
Commit the given bytes to the storage medium immediately.
Swift_ByteStream_AbstractFilterableInputStream::_flush()
Flush any buffers/content with immediate effect.

Class Details

[line 22]
A generic IoBuffer implementation supporting remote sockets and local processes.



Tags:

author:  Chris Corbyn
filesource:  Source Code for this file


[ Top ]


Class Methods


constructor __construct [line 49]

Swift_Transport_StreamBuffer __construct( Swift_ReplacementFilterFactory $replacementFactory)

Create a new StreamBuffer using $replacementFactory for transformations.



Tags:

access:  public


Parameters:

Swift_ReplacementFilterFactory   $replacementFactory  

[ Top ]

method initialize [line 60]

void initialize( $params)

Perform any initialization needed, using the given $params.

Parameters will vary depending upon the type of IoBuffer used.




Tags:

access:  public



Implementation of:
Swift_Transport_IoBuffer::initialize()
Perform any initialization needed, using the given $params.

Parameters:

array   $params  

[ Top ]

method read [line 180]

string read( int $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.



Tags:

access:  public


Parameters:

int   $length  

[ Top ]

method readLine [line 163]

string readLine( int $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.




Tags:

access:  public



Implementation of:
Swift_Transport_IoBuffer::readLine()
Get a line of output (including any CRLF).

Parameters:

int   $sequence   of last write to scan from

[ Top ]

method setParam [line 80]

void setParam( string $param, mixed $value)

Set an individual param on the buffer (e.g. switching to SSL).



Tags:

access:  public



Implementation of:
Swift_Transport_IoBuffer::setParam()
Set an individual param on the buffer (e.g. switching to SSL).

Parameters:

string   $param  
mixed   $value  

[ Top ]

method setReadPointer [line 190]

void setReadPointer( $byteOffset)

Not implemented



Tags:

access:  public


Parameters:

   $byteOffset  

[ Top ]

method setWriteTranslations [line 133]

void setWriteTranslations( $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.



Tags:

access:  public



Implementation of:
Swift_Transport_IoBuffer::setWriteTranslations()
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  

[ Top ]

method terminate [line 106]

void terminate( )

Perform any shutdown logic needed.



Tags:

access:  public



Implementation of:
Swift_Transport_IoBuffer::terminate()
Perform any shutdown logic needed.
[ Top ]

method _commit [line 206]

void _commit( $bytes)

Write this bytes to the stream



Tags:

access:  protected


Overrides Swift_ByteStream_AbstractFilterableInputStream::_commit() (Commit the given bytes to the storage medium immediately.)

Parameters:

   $bytes  

[ Top ]

method _flush [line 197]

void _flush( )

Flush the stream contents



Tags:

access:  protected


Overrides Swift_ByteStream_AbstractFilterableInputStream::_flush() (Flush any buffers/content with immediate effect.)

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:34:38 -0500 by phpDocumentor 1.4.3