Kohana v3.3.2
This commit is contained in:
@@ -70,7 +70,7 @@ class Kohana_Inflector {
|
||||
*
|
||||
* [!!] Special inflections are defined in `config/inflector.php`.
|
||||
*
|
||||
* @param string $str word to singularize
|
||||
* @param string $str word to make singular
|
||||
* @param integer $count count of thing
|
||||
* @return string
|
||||
* @uses Inflector::uncountable
|
||||
@@ -183,6 +183,10 @@ class Kohana_Inflector {
|
||||
{
|
||||
$str = Inflector::$irregular[$str];
|
||||
}
|
||||
elseif (in_array($str, Inflector::$irregular))
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
elseif (preg_match('/[sxz]$/', $str) OR preg_match('/[^aeioudgkprt]h$/', $str))
|
||||
{
|
||||
$str .= 'es';
|
||||
@@ -197,7 +201,7 @@ class Kohana_Inflector {
|
||||
$str .= 's';
|
||||
}
|
||||
|
||||
// Convert to uppsecase if nessasary
|
||||
// Convert to uppercase if necessary
|
||||
if ($is_uppercase)
|
||||
{
|
||||
$str = strtoupper($str);
|
||||
@@ -266,4 +270,4 @@ class Kohana_Inflector {
|
||||
return preg_replace('/[_-]+/', ' ', trim($str));
|
||||
}
|
||||
|
||||
} // End Inflector
|
||||
}
|
||||
|
Reference in New Issue
Block a user