Overview

Namespaces

  • Composer
    • Autoload
  • Illuminate
    • Support
      • Contracts
      • Facades
  • Laravella
    • Crud
      • Exceptions
      • Facades
  • None
  • PHP

Classes

  • ClassLoader
  • Collection
  • Fluent
  • Manager
  • MessageBag
  • NamespacedItemResolver
  • Pluralizer
  • SerializableClosure
  • ServiceProvider
  • Str
  • Overview
  • Namespace
  • Class
  • Tree

Class Pluralizer

Namespace: Illuminate\Support
Located at vendor/illuminate/support/Illuminate/Support/Pluralizer.php
Methods summary
public static string
# singular( string $value )

Get the singular form of the given word.

Get the singular form of the given word.

Parameters

$value
string
$value

Returns

string
public static string
# plural( string $value, integer $count = 2 )

Get the plural form of the given word.

Get the plural form of the given word.

Parameters

$value
string
$value
$count
integer
$count

Returns

string
protected static string
# inflect( string $value, array $source, array $irregular )

Perform auto inflection on an English word.

Perform auto inflection on an English word.

Parameters

$value
string
$value
$source
array
$source
$irregular
array
$irregular

Returns

string
protected static boolean
# uncountable( string $value )

Determine if the given value is uncountable.

Determine if the given value is uncountable.

Parameters

$value
string
$value

Returns

boolean
protected static string
# matchCase( string $value, string $comparison )

Attempt to match the case on two strings.

Attempt to match the case on two strings.

Parameters

$value
string
$value
$comparison
string
$comparison

Returns

string
Properties summary
protected static array $plural array( '/(quiz)$/i' => "$1zes", '/^(ox)$/i' => "$1en", '/([m|l])ouse$/i' => "$1ice", '/(matr|vert|ind)ix|ex$/i' => "$1ices", '/(x|ch|ss|sh)$/i' => "$1es", '/([^aeiouy]|qu)y$/i' => "$1ies", '/(hive)$/i' => "$1s", '/(?:([^f])fe|([lr])f)$/i' => "$1$2ves", '/(shea|lea|loa|thie)f$/i' => "$1ves", '/sis$/i' => "ses", '/([ti])um$/i' => "$1a", '/(tomat|potat|ech|her|vet)o$/i' => "$1oes", '/(bu)s$/i' => "$1ses", '/(alias)$/i' => "$1es", '/(octop)us$/i' => "$1i", '/(ax|test)is$/i' => "$1es", '/(us)$/i' => "$1es", '/s$/i' => "s", '/$/' => "s", )
#

Plural word form rules.

Plural word form rules.

protected static array $singular array( '/(quiz)zes$/i' => "$1", '/(matr)ices$/i' => "$1ix", '/(vert|ind)ices$/i' => "$1ex", '/^(ox)en$/i' => "$1", '/(alias)es$/i' => "$1", '/(octop|vir)i$/i' => "$1us", '/(cris|ax|test)es$/i' => "$1is", '/(shoe)s$/i' => "$1", '/(o)es$/i' => "$1", '/(bus)es$/i' => "$1", '/([m|l])ice$/i' => "$1ouse", '/(x|ch|ss|sh)es$/i' => "$1", '/(m)ovies$/i' => "$1ovie", '/(s)eries$/i' => "$1eries", '/([^aeiouy]|qu)ies$/i' => "$1y", '/([lr])ves$/i' => "$1f", '/(tive)s$/i' => "$1", '/(hive)s$/i' => "$1", '/(li|wi|kni)ves$/i' => "$1fe", '/(shea|loa|lea|thie)ves$/i' => "$1f", '/(^analy)ses$/i' => "$1sis", '/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => "$1$2sis", '/([ti])a$/i' => "$1um", '/(n)ews$/i' => "$1ews", '/(h|bl)ouses$/i' => "$1ouse", '/(corpse)s$/i' => "$1", '/(us)es$/i' => "$1", '/(us|ss)$/i' => "$1", '/s$/i' => "", )
#

Singular word form rules.

Singular word form rules.

protected static array $irregular array( 'child' => 'children', 'foot' => 'feet', 'goose' => 'geese', 'man' => 'men', 'move' => 'moves', 'person' => 'people', 'sex' => 'sexes', 'tooth' => 'teeth', )
#

Irregular word forms.

Irregular word forms.

protected static array $uncountable array( 'audio', 'equipment', 'deer', 'fish', 'gold', 'information', 'money', 'rice', 'police', 'series', 'sheep', 'species', 'moose', 'chassis', 'traffic', )
#

Uncountable word forms.

Uncountable word forms.

protected static array $pluralCache array()
#

The cached copies of the plural inflections.

The cached copies of the plural inflections.

protected static array $singularCache array()
#

The cached copies of the singular inflections.

The cached copies of the singular inflections.

crud API documentation generated by ApiGen 2.8.0