PHP Class Swift_Transport_StreamBuffer, Halite

Author: Chris Corbyn
Inheritance: extends Swift_ByteStream_AbstractFilterableInputStream, implements Swift_Transport_IoBuffer
Afficher le fichier Open project: HaliteChallenge/Halite

Méthodes publiques

Méthode Description
__construct ( Swift_ReplacementFilterFactory $replacementFactory ) Create a new StreamBuffer using $replacementFactory for transformations.
initialize ( array $params ) Perform any initialization needed, using the given $params.
read ( integer $length ) : string | boolean Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
readLine ( integer $sequence ) : string Get a line of output (including any CRLF).
setParam ( string $param, mixed $value ) Set an individual param on the buffer (e.g. switching to SSL).
setReadPointer ( $byteOffset ) Not implemented
setWriteTranslations ( array $replacements ) Set an array of string replacements which should be made on data written to the buffer.
startTLS ( )
terminate ( ) Perform any shutdown logic needed.

Méthodes protégées

Méthode Description
_commit ( $bytes ) Write this bytes to the stream
_flush ( ) Flush the stream contents

Private Methods

Méthode Description
_establishProcessConnection ( ) Opens a process for input/output.
_establishSocketConnection ( ) Establishes a connection to a remote server.
_getReadConnectionDescription ( )

Method Details

__construct() public méthode

Create a new StreamBuffer using $replacementFactory for transformations.
public __construct ( Swift_ReplacementFilterFactory $replacementFactory )
$replacementFactory Swift_ReplacementFilterFactory

_commit() protected méthode

Write this bytes to the stream
protected _commit ( $bytes )

_flush() protected méthode

Flush the stream contents
protected _flush ( )

initialize() public méthode

Parameters will vary depending upon the type of IoBuffer used.
public initialize ( array $params )
$params array

read() public méthode

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 read ( integer $length ) : string | boolean
$length integer
Résultat string | boolean

readLine() public méthode

The $sequence number comes from any writes and may or may not be used depending upon the implementation.
public readLine ( integer $sequence ) : string
$sequence integer of last write to scan from
Résultat string

setParam() public méthode

Set an individual param on the buffer (e.g. switching to SSL).
public setParam ( string $param, mixed $value )
$param string
$value mixed

setReadPointer() public méthode

Not implemented
public setReadPointer ( $byteOffset )

setWriteTranslations() public méthode

This could replace LF with CRLF for example.
public setWriteTranslations ( array $replacements )
$replacements array

startTLS() public méthode

public startTLS ( )

terminate() public méthode

Perform any shutdown logic needed.
public terminate ( )