This Inflector is a port of Ruby on Rails Inflector. It can be really helpful for developers that want to create frameworks based on naming conventions rather than configurations. It was ported to PHP for the Akelos Framework, a multilingual Ruby on Rails like framework for PHP that will be launched soon.
Since: 0.1
Beispiel #1
0
 public static function pluralize($word)
 {
     foreach (self::$_exceptions as $exception) {
         if ($exception['singular'] == $word) {
             return $exception['plural'];
         }
     }
     return parent::pluralize($word);
 }