\Swift_StreamFilters_ByteArrayReplacementFilter
Processes bytes as they pass through a buffer and replaces sequences in it.
This stream filter deals with Byte arrays rather than simple strings.
- Author: Chris Corbyn
Synopsis
class Swift_StreamFilters_ByteArrayReplacementFilter
implements
Swift_StreamFilter
{
- // members
- private $_search;
- private $_replace;
- private $_index;
- private array $_tree;
- private integer $_treeMaxLen;
- private $_repSize;
- // methods
- public void __construct()
- public boolean shouldBuffer()
- public array filter()
Hierarchy
Implements
Members
private
-
$_index
The Index for searching - $_repSize
-
$_replace
The replacement(s) to make -
$_search
The needle(s) to search for -
$_tree
The Search Tree -
$_treeMaxLen
Gives the size of the largest search
Methods
public
- __construct() — Create a new ByteArrayReplacementFilter with $search and $replace.
- filter() — Perform the actual replacements on $buffer and return the result.
- shouldBuffer() — Returns true if based on the buffer passed more bytes should be buffered.