\Symfony\Component\String\InflectorInflectorInterface

Summary

Methods
Constants
singularize()
pluralize()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

singularize()

singularize(string  $plural) : string[]

Returns the singular forms of a string.

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

Parameters

string $plural

Returns

string[] —

An array of possible singular forms

pluralize()

pluralize(string  $singular) : string[]

Returns the plural forms of a string.

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

Parameters

string $singular

Returns

string[] —

An array of possible plural forms