interface InflectorInterface

The generic interface to create a plural form of a name.

Methods

string
getPluralForm(string $root)

Generate a plural name based on the passed in root.

string
getSingularForm(string $root)

Generate a singular name based on the passed in root.

bool
isPlural(string $root)

Check if $root word is plural.

bool
isSingular(string $root)

Check if $root word is singular.

Details

at line 26
string getPluralForm(string $root)

Generate a plural name based on the passed in root.

Parameters

string $root The root that needs to be pluralized (e.g. Author)

Return Value

string The plural form of $root.

at line 35
string getSingularForm(string $root)

Generate a singular name based on the passed in root.

Parameters

string $root The root that needs to be singularized (e.g. Authors)

Return Value

string The singular form of $root.

at line 44
bool isPlural(string $root)

Check if $root word is plural.

Parameters

string $root

Return Value

bool

at line 53
bool isSingular(string $root)

Check if $root word is singular.

Parameters

string $root

Return Value

bool