64 $this->data[$from] = $to;
71 $this->data = $data + $this->data;
78 $this->data = $other->data + $this->data;
85 unset( $this->data[$from] );
92 foreach ( $data as $from => $to ) {
102 return strtr( $subject, $this->data );
Wrapper around strtr() that holds replacements.
setPair( $from, $to)
Set an element of the replacement array.
__construct(array $data=[])
Create an object with the specified replacement array The array should have the same form as the repl...
setArray(array $data)
Set the whole replacement array at once.
merge(ReplacementArray $other)