|
static | addRule ($data, string $ruleType) |
|
Joomla Framework String Inflector Class
The Inflector transforms words
- Depuis
- 1.0
◆ addCountableRule()
addCountableRule |
( |
|
$data | ) |
|
Adds a countable word.
- Paramètres
-
mixed | $data | A string or an array of strings to add. |
- Renvoie
- $this
- Depuis
- 1.0
Références $data, $this, et Inflector\addRule().
◆ addPluraliseRule()
addPluraliseRule |
( |
|
$data | ) |
|
◆ addRule()
static addRule |
( |
|
$data, |
|
|
string |
$ruleType |
|
) |
| |
|
private |
◆ addSingulariseRule()
addSingulariseRule |
( |
|
$data | ) |
|
◆ addWord()
addWord |
( |
|
$singular, |
|
|
|
$plural = '' |
|
) |
| |
Adds a specific singular-plural pair for a word.
- Paramètres
-
string | $singular | The singular form of the word. |
string | $plural | The plural form of the word. If omitted, it is assumed the singular and plural are identical. |
- Renvoie
- $this
- Depuis
- 1.0
- Obsolète:
- 3.0 Use Doctrine::rules() instead.
Références $this, et class.
◆ getInstance()
static getInstance |
( |
|
$new = false | ) |
|
|
static |
Gets an instance of the Inflector singleton.
- Paramètres
-
boolean | $new | If true (default is false), returns a new instance regardless if one exists. This argument is mainly used for testing. |
- Renvoie
- static
- Depuis
- 1.0
- Obsolète:
- 3.0 Use static methods without a class instance instead.
◆ isCountable()
Checks if a word is countable.
- Paramètres
-
string | $word | The string input. |
- Renvoie
- boolean True if word is countable, false otherwise.
- Depuis
- 1.0
◆ isPlural()
◆ isSingular()
Checks if a word is in a singular form.
- Paramètres
-
string | $word | The string input. |
- Renvoie
- boolean True if word is singular, false if not.
- Depuis
- 1.0
Références Inflector\toSingular().
◆ toPlural()
Converts a word into its plural form.
- Paramètres
-
string | $word | The singular word to pluralise. |
- Renvoie
- string The word in plural form.
- Depuis
- 1.0
- Obsolète:
- 3.0 Use Doctrine::pluralize() instead.
Références class.
Référencé par Inflector\isPlural().
◆ toSingular()
◆ $countable
Valeur initiale := [
'rules' => [
'id',
'hits',
'clicks',
]
◆ $instance
La documentation de cette classe a été générée à partir du fichier suivant :