TextWheel
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- compile() : mixed
- getSubWheel() : TextWheel
- Get an internal global subwheel read acces for annymous function only
- setRuleSet() : mixed
- Set RuleSet
- text() : string
- Apply all rules of RuleSet to a text
- apply() : mixed
- Apply a rule to a text
- createSubWheel() : TextWheel
- Create SubWheel (can be overriden in debug class)
- initRule() : mixed
- Initializing a rule a first call including file, creating function or wheel optimizing tests
- replace_all() : mixed
- Static replacement of All text
- replace_all_cb() : mixed
- Call back replacement of All text
- replace_identity() : mixed
- No Replacement function fall back in case of unknown method for replacing should be called max once per rule
- replace_preg() : mixed
- Static Preg replacement
- replace_preg_cb() : mixed
- Callback Preg replacement
- replace_split() : never
- Static split replacement : invalid
- replace_split_cb() : mixed
- Callback split replacement
- replace_str() : mixed
- Static string replacement
- replace_str_cb() : mixed
- Callback string replacement
- replace_strtr() : mixed
- Fast Static string replacement one char to one char
- ruleCompiledEntryName() : string
- export() : mixed
Properties
$compiled
protected
mixed
$compiled
= []
$ruleset
protected
mixed
$ruleset
$subwheel
protected
static mixed
$subwheel
= []
Methods
__construct()
public
__construct([TextWheelRuleSet $ruleset = null ]) : mixed
Parameters
- $ruleset : TextWheelRuleSet = null
compile()
public
compile([mixed $b = null ]) : mixed
Parameters
- $b : mixed = null
getSubWheel()
Get an internal global subwheel read acces for annymous function only
public
static & getSubWheel(int $n) : TextWheel
Parameters
- $n : int
Return values
TextWheelsetRuleSet()
Set RuleSet
public
setRuleSet(TextWheelRuleSet $ruleset) : mixed
Parameters
- $ruleset : TextWheelRuleSet
text()
Apply all rules of RuleSet to a text
public
text(string $t) : string
Parameters
- $t : string
Return values
stringapply()
Apply a rule to a text
protected
apply(TextWheelRule &$rule, string &$t[, int &$count = null ]) : mixed
Parameters
- $rule : TextWheelRule
- $t : string
- $count : int = null
createSubWheel()
Create SubWheel (can be overriden in debug class)
protected
& createSubWheel(TextWheelRuleset &$rules) : TextWheel
Parameters
- $rules : TextWheelRuleset
Return values
TextWheelinitRule()
Initializing a rule a first call including file, creating function or wheel optimizing tests
protected
initRule(TextWheelRule &$rule) : mixed
Parameters
- $rule : TextWheelRule
replace_all()
Static replacement of All text
protected
static replace_all(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_all_cb()
Call back replacement of All text
protected
static replace_all_cb(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_identity()
No Replacement function fall back in case of unknown method for replacing should be called max once per rule
protected
static replace_identity(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_preg()
Static Preg replacement
protected
static replace_preg(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_preg_cb()
Callback Preg replacement
protected
static replace_preg_cb(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_split()
Static split replacement : invalid
protected
static replace_split(mixed &$match, mixed &$replace, string &$t, int &$count) : never
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
Return values
neverreplace_split_cb()
Callback split replacement
protected
static replace_split_cb(array<string|int, mixed> &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : array<string|int, mixed>
- $replace : mixed
- $t : string
- $count : int
replace_str()
Static string replacement
protected
static replace_str(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_str_cb()
Callback string replacement
protected
static replace_str_cb(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
replace_strtr()
Fast Static string replacement one char to one char
protected
static replace_strtr(mixed &$match, mixed &$replace, string &$t, int &$count) : mixed
Parameters
- $match : mixed
- $replace : mixed
- $t : string
- $count : int
ruleCompiledEntryName()
protected
ruleCompiledEntryName(mixed $replace) : string
Parameters
- $replace : mixed
Return values
stringexport()
private
static export(mixed $x) : mixed
Parameters
- $x : mixed