MediaWiki fundraising/REL1_35
|
Wrapper around strtr() that holds replacements. More...
Public Member Functions | |
__construct (array $data=[]) | |
Create an object with the specified replacement array The array should have the same form as the replacement array for strtr() | |
__sleep () | |
getArray () | |
merge (ReplacementArray $other) | |
mergeArray ( $data) | |
removeArray ( $data) | |
removePair ( $from) | |
replace ( $subject) | |
setArray (array $data) | |
Set the whole replacement array at once. | |
setPair ( $from, $to) | |
Set an element of the replacement array. | |
Private Attributes | |
$data = [] | |
Wrapper around strtr() that holds replacements.
Definition at line 24 of file ReplacementArray.php.
ReplacementArray::__construct | ( | array | $data = [] | ) |
Create an object with the specified replacement array The array should have the same form as the replacement array for strtr()
array | $data |
Definition at line 32 of file ReplacementArray.php.
References $data.
ReplacementArray::__sleep | ( | ) |
Definition at line 39 of file ReplacementArray.php.
ReplacementArray::getArray | ( | ) |
ReplacementArray::merge | ( | ReplacementArray | $other | ) |
ReplacementArray | $other |
Definition at line 77 of file ReplacementArray.php.
References $data.
ReplacementArray::mergeArray | ( | $data | ) |
ReplacementArray::removeArray | ( | $data | ) |
array | $data |
Definition at line 91 of file ReplacementArray.php.
References $data, and removePair().
ReplacementArray::removePair | ( | $from | ) |
string | $from |
Definition at line 84 of file ReplacementArray.php.
Referenced by removeArray().
ReplacementArray::replace | ( | $subject | ) |
ReplacementArray::setArray | ( | array | $data | ) |
Set the whole replacement array at once.
array | $data |
Definition at line 47 of file ReplacementArray.php.
References $data.
ReplacementArray::setPair | ( | $from, | |
$to ) |
Set an element of the replacement array.
string | $from | |
string | $to |
Definition at line 63 of file ReplacementArray.php.
|
private |
Definition at line 25 of file ReplacementArray.php.
Referenced by __construct(), getArray(), merge(), mergeArray(), removeArray(), and setArray().