PHP Class Swift_StreamFilters_StringReplacementFilter, Halite

Author: Chris Corbyn
Inheritance: implements Swift_StreamFilter
显示文件 Open project: HaliteChallenge/Halite

Public Methods

Method Description
__construct ( string | array $search, string | array $replace ) Create a new StringReplacementFilter with $search and $replace.
filter ( string $buffer ) : string Perform the actual replacements on $buffer and return the result.
shouldBuffer ( string $buffer ) : boolean Returns true if based on the buffer passed more bytes should be buffered.

Method Details

__construct() public method

Create a new StringReplacementFilter with $search and $replace.
public __construct ( string | array $search, string | array $replace )
$search string | array
$replace string | array

filter() public method

Perform the actual replacements on $buffer and return the result.
public filter ( string $buffer ) : string
$buffer string
return string

shouldBuffer() public method

Returns true if based on the buffer passed more bytes should be buffered.
public shouldBuffer ( string $buffer ) : boolean
$buffer string
return boolean