Class Swift_StreamFilters_StringReplacementFilter

InheritanceSwift_StreamFilters_StringReplacementFilter
ImplementsSwift_StreamFilter

Processes bytes as they pass through a buffer and replaces sequences in it.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Create a new StringReplacementFilter with $search and $replace. Swift_StreamFilters_StringReplacementFilter
filter() Perform the actual replacements on $buffer and return the result. Swift_StreamFilters_StringReplacementFilter
shouldBuffer() Returns true if based on the buffer passed more bytes should be buffered. Swift_StreamFilters_StringReplacementFilter

Method Details

__construct() public method

Create a new StringReplacementFilter with $search and $replace.

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

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

public string filter ( $buffer )
$buffer string
shouldBuffer() public method

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

public bool shouldBuffer ( $buffer )
$buffer string