more refactoring and changes.

This commit is contained in:
Taylor Otwell
2011-09-08 17:49:16 -05:00
parent 03654fc5a1
commit abc1fad6c1
34 changed files with 883 additions and 482 deletions

View File

@@ -86,14 +86,14 @@ class Inflector {
* @var array
*/
private static $irregular = array(
'move' => 'moves',
'child' => 'children',
'foot' => 'feet',
'goose' => 'geese',
'sex' => 'sexes',
'child' => 'children',
'man' => 'men',
'tooth' => 'teeth',
'move' => 'moves',
'person' => 'people',
'sex' => 'sexes',
'tooth' => 'teeth',
);
/**
@@ -102,20 +102,29 @@ class Inflector {
* @var array
*/
private static $uncountable = array(
'sheep',
'fish',
'equipment',
'data',
'deer',
'series',
'species',
'fish',
'information',
'money',
'rice',
'information',
'equipment',
'series',
'sheep',
'species',
);
/**
* Get the plural form of a word if the specified count is greater than one.
*
* <code>
* // Returns "friend"
* echo Inflector::plural_if('friend', 1);
*
* // Returns "friends"
* echo Inflector::plural_if('friend', 2);
* </code>
*
* @param string $value
* @param int $count
* @return string