PHP Class Swift_StreamFilters_ByteArrayReplacementFilter

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

Méthodes publiques

Méthode 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 méthode

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

filter() public méthode

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

shouldBuffer() public méthode

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