Пример #1
0
 /**
  * Makes a singular word plural.
  *
  * @param   string  word to pluralize
  * @return  string
  */
 public static function plural($str, $count = NULL)
 {
     if (!$str) {
         return $str;
     }
     $parts = explode('_', $str);
     $last = inflector::_plural(array_pop($parts), $count);
     $pre = implode('_', $parts);
     if (strlen($pre)) {
         $pre .= '_';
     }
     return $pre . $last;
 }