PHP 클래스 Swift_Transport_StreamBuffer, Halite

저자: Chris Corbyn
상속: extends Swift_ByteStream_AbstractFilterableInputStream, implements Swift_Transport_IoBuffer
파일 보기 프로젝트 열기: HaliteChallenge/Halite

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
_commit ( $bytes ) Write this bytes to the stream
_flush ( ) Flush the stream contents

비공개 메소드들

메소드 설명
_establishProcessConnection ( ) Opens a process for input/output.
_establishSocketConnection ( ) Establishes a connection to a remote server.
_getReadConnectionDescription ( )

메소드 상세

__construct() 공개 메소드

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

_commit() 보호된 메소드

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

_flush() 보호된 메소드

Flush the stream contents
protected _flush ( )

initialize() 공개 메소드

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

read() 공개 메소드

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
리턴 string | boolean

readLine() 공개 메소드

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
리턴 string

setParam() 공개 메소드

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

setReadPointer() 공개 메소드

Not implemented
public setReadPointer ( $byteOffset )

setWriteTranslations() 공개 메소드

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

startTLS() 공개 메소드

public startTLS ( )

terminate() 공개 메소드

Perform any shutdown logic needed.
public terminate ( )