PHP Class Illuminate\Support\Pluralizer

Exibir arquivo Open project: illuminate/support Class Usage Examples

Public Properties

Property Type Description
$uncountable array Uncountable word forms.

Public Methods

Method Description
plural ( string $value, integer $count = 2 ) : string Get the plural form of an English word.
singular ( string $value ) : string Get the singular form of an English word.

Protected Methods

Method Description
matchCase ( string $value, string $comparison ) : string Attempt to match the case on two strings.
uncountable ( string $value ) : boolean Determine if the given value is uncountable.

Method Details

matchCase() protected static method

Attempt to match the case on two strings.
protected static matchCase ( string $value, string $comparison ) : string
$value string
$comparison string
return string

plural() public static method

Get the plural form of an English word.
public static plural ( string $value, integer $count = 2 ) : string
$value string
$count integer
return string

singular() public static method

Get the singular form of an English word.
public static singular ( string $value ) : string
$value string
return string

uncountable() protected static method

Determine if the given value is uncountable.
protected static uncountable ( string $value ) : boolean
$value string
return boolean

Property Details

$uncountable public_oe static_oe property

Uncountable word forms.
public static array $uncountable
return array