Class Inflections
A representation of the inflections used by an inflector.
Methods summary
public static
get( string $locale
= INFLECTOR_DEFAULT_LOCALE )
: ICanBoogie\Inflections
Returns inflections for the specified locale.
public
acronym( string $acronym
)
: ICanBoogie\Inflections
Specifies a new acronym. An acronym must be specified as it will appear in a camelized string. An underscore string that contains the acronym will retain the acronym when passed to camelize, humanize, or titleize. A camelized string that contains the acronym will maintain the acronym when titleized or humanized, and will convert the acronym into a non-delimited single lowercase word when passed to underscore.
public
plural( string $rule
, string $replacement
)
: ICanBoogie\Inflections
Specifies a new pluralization rule and its replacement.
public
singular( string $rule
, string $replacement
)
: ICanBoogie\Inflections
Specifies a new singularization rule and its replacement.
public
irregular( string $singular
, string $plural
)
: ICanBoogie\Inflections
Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form.
public
uncountable( string|array $word
)
: ICanBoogie\Inflections
Add uncountable words that shouldn't be attempted inflected.
public
human( string $rule
, string $replacement
)
: ICanBoogie\Inflections
Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name').