Class Swift_StreamFilters_ByteArrayReplacementFilter
Inheritance | Swift_StreamFilters_ByteArrayReplacementFilter |
---|---|
Implements | Swift_StreamFilter |
Processes bytes as they pass through a buffer and replaces sequences in it.
This stream filter deals with Byte arrays rather than simple strings.
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Create a new ByteArrayReplacementFilter with $search and $replace. | Swift_StreamFilters_ByteArrayReplacementFilter |
filter() | Perform the actual replacements on $buffer and return the result. | Swift_StreamFilters_ByteArrayReplacementFilter |
shouldBuffer() | Returns true if based on the buffer passed more bytes should be buffered. | Swift_StreamFilters_ByteArrayReplacementFilter |
Method Details
Create a new ByteArrayReplacementFilter with $search and $replace.
public void __construct ( $search, $replace ) | ||
$search | array | |
$replace | array |
Perform the actual replacements on $buffer and return the result.
public array filter ( $buffer, $_minReplaces = -1 ) | ||
$buffer | array | |
$_minReplaces | int |
Returns true if based on the buffer passed more bytes should be buffered.
public bool shouldBuffer ( $buffer ) | ||
$buffer | array |