Documentation

InflectorInterface extends ConfigurableInterface

Language inflection (in English) for pluralisation.

Not for i18n.

Table of Contents

Methods

plural()  : string
Makes a singular word plural.
singular()  : string
Makes a plural word singular.
uncountable()  : bool
Checks if a word is defined as uncountable.
update()  : void
Update the object with a new configuration.

Methods

plural()

Makes a singular word plural.

public plural(string $word[, int $count = 0 ]) : string
Parameters
$word : string
$count : int = 0
Return values
string

singular()

Makes a plural word singular.

public singular(string $word[, int $count = 1 ]) : string
Parameters
$word : string
$count : int = 1

number of things

Return values
string

uncountable()

Checks if a word is defined as uncountable.

public uncountable(string $word) : bool
Parameters
$word : string
Return values
bool

update()

Update the object with a new configuration.

public update(iterable<string|int, mixed> $config) : void
Parameters
$config : iterable<string|int, mixed>
On this page

Search results