Inflector
in package
Converts words between singular and plural forms.
Tags
Table of Contents
- $englishInflector : mixed
- pluralize() : string|array<string|int, mixed>
- Returns the plural form of a word.
- singularize() : string|array<string|int, mixed>
- Returns the singular form of a word.
- __construct() : mixed
- This class should not be instantiated.
- getEnglishInflector() : EnglishInflector
Properties
$englishInflector
private
static mixed
$englishInflector
Methods
pluralize()
Returns the plural form of a word.
public
static pluralize(string $singular) : string|array<string|int, mixed>
If the method can't determine the form with certainty, an array of the possible plurals is returned.
Parameters
- $singular : string
-
A word in singular form
Return values
string|array<string|int, mixed> —singularize()
Returns the singular form of a word.
public
static singularize(string $plural) : string|array<string|int, mixed>
If the method can't determine the form with certainty, an array of the possible singulars is returned.
Parameters
- $plural : string
-
A word in plural form
Return values
string|array<string|int, mixed> —__construct()
This class should not be instantiated.
private
__construct() : mixed
Return values
mixed —getEnglishInflector()
private
static getEnglishInflector() : EnglishInflector