Documentation

InflectorInterface
in

Table of Contents

pluralize()  : array<string|int, string>
Returns the plural forms of a string.
singularize()  : array<string|int, string>
Returns the singular forms of a string.

Methods

pluralize()

Returns the plural forms of a string.

public pluralize(string $singular) : array<string|int, string>

If the method can't determine the form with certainty, several possible plurals are returned.

Parameters
$singular : string
Return values
array<string|int, string>

An array of possible plural forms

singularize()

Returns the singular forms of a string.

public singularize(string $plural) : array<string|int, string>

If the method can't determine the form with certainty, several possible singulars are returned.

Parameters
$plural : string
Return values
array<string|int, string>

An array of possible singular forms

Search results