refactoring for dependency injection and testability.

This commit is contained in:
Taylor Otwell
2011-08-25 22:53:05 -05:00
parent 0b86c94551
commit 1e7850d9ba
75 changed files with 1441 additions and 1461 deletions

View File

@@ -149,7 +149,9 @@ class Inflector {
*/
public static function plural($value)
{
return static::$plural_cache[$value] = static::inflect($value, static::$plural_cache, array_flip(static::$irregular), static::$plural);
$irregular = array_flip(static::$irregular);
return static::$plural_cache[$value] = static::inflect($value, static::$plural_cache, $irregular, static::$plural);
}
/**