Documentation

InflectorInterface

Table of Contents

Methods

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>

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>

        
On this page

Search results