PHP Class Swift_StreamFilters_ByteArrayReplacementFilter

This stream filter deals with Byte arrays rather than simple strings.
Author: Chris Corbyn
Inheritance: implements Swift_StreamFilter
Mostrar archivo Open project: swiftmailer/swiftmailer

Public Methods

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

Method Details

__construct() public method

Create a new ByteArrayReplacementFilter with $search and $replace.
public __construct ( array $search, array $replace )
$search array
$replace array

filter() public method

Perform the actual replacements on $buffer and return the result.
public filter ( array $buffer, integer $minReplaces ) : array
$buffer array
$minReplaces integer
return array

shouldBuffer() public method

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