Default Equivset.
More...
|
| __construct (array $data=[], string $dataPath='') |
|
| all () |
| {Gets the equivset.- Returns
- array An associative array of equivalent characters.
}
|
|
| normalize (string $value) |
| {Normalize a string.- Parameters
-
string | $value | The string to normalize against the equivset. |
- Returns
- string
}
|
|
| isEqual (string $str1, string $str2) |
| {Determine if the two strings are visually equal.- Parameters
-
string | $str1 | The first string. |
string | $str2 | The second string. |
- Returns
- bool
}
|
|
| has (string $key) |
| {Determine if an equivalent character exists.- Parameters
-
string | $key | The character that was used. |
- Returns
- bool If the character has an equivalent.
}
|
|
| get (string $key) |
| {Get an equivalent character.- Parameters
-
string | $key | The character that was used. |
- Returns
- string The equivalent character.
- Exceptions
-
LogicException | If character does not exist. |
}
|
|
| getIterator () |
| {}
|
|
|
| load () |
| Get the equivset.
|
|
|
array | $data |
|
string | $dataPath |
|
◆ __construct()
Wikimedia\Equivset\Equivset::__construct |
( |
array | $data = [], |
|
|
string | $dataPath = '' ) |
- Parameters
-
| array<string,string> | $data Equivalent Set |
string | $dataPath | Path of the equivset array. |
◆ all()
Wikimedia\Equivset\Equivset::all |
( |
| ) |
|
◆ get()
Wikimedia\Equivset\Equivset::get |
( |
string | $key | ) |
|
{Get an equivalent character.
- Parameters
-
string | $key | The character that was used. |
- Returns
- string The equivalent character.
- Exceptions
-
LogicException | If character does not exist. |
}
Implements Wikimedia\Equivset\EquivsetInterface.
◆ has()
Wikimedia\Equivset\Equivset::has |
( |
string | $key | ) |
|
{Determine if an equivalent character exists.
- Parameters
-
string | $key | The character that was used. |
- Returns
- bool If the character has an equivalent.
}
Implements Wikimedia\Equivset\EquivsetInterface.
◆ isEqual()
Wikimedia\Equivset\Equivset::isEqual |
( |
string | $str1, |
|
|
string | $str2 ) |
{Determine if the two strings are visually equal.
- Parameters
-
string | $str1 | The first string. |
string | $str2 | The second string. |
- Returns
- bool
}
Implements Wikimedia\Equivset\EquivsetInterface.
◆ load()
Wikimedia\Equivset\Equivset::load |
( |
| ) |
|
|
protected |
Get the equivset.
- Returns
- array<string,string> An associative array of equivalent characters.
◆ normalize()
Wikimedia\Equivset\Equivset::normalize |
( |
string | $value | ) |
|
The documentation for this class was generated from the following file: