Class Swift_StreamFilters_ByteArrayReplacementFilter

InheritanceSwift_StreamFilters_ByteArrayReplacementFilter
ImplementsSwift_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

Hide inherited methods

MethodDescriptionDefined 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

__construct() public method

Create a new ByteArrayReplacementFilter with $search and $replace.

public void __construct ( $search, $replace )
$search array
$replace array
filter() public method

Perform the actual replacements on $buffer and return the result.

public array filter ( $buffer, $_minReplaces = -1 )
$buffer array
$_minReplaces int
shouldBuffer() public method

Returns true if based on the buffer passed more bytes should be buffered.

public bool shouldBuffer ( $buffer )
$buffer array