示例#1
0
 /**
  * Returns an inflector for the specified locale.
  *
  * Note: Inflectors are shared for the same locale. If you need to alter an inflector you
  * MUST clone it first.
  *
  * @param string $locale
  *
  * @return \ICanBoogie\Inflector
  */
 public static function get($locale = self::DEFAULT_LOCALE)
 {
     if (isset(self::$inflectors[$locale])) {
         return self::$inflectors[$locale];
     }
     return self::$inflectors[$locale] = new static(Inflections::get($locale));
 }
 /**
  * Returns an inflector for the specified locale.
  *
  * Note: Inflectors are shared for the same locale. If you need to alter an inflector you
  * MUST clone it first.
  *
  * @param string $locale
  *
  * @return \ICanBoogie\Inflector
  */
 public static function get($locale = 'en')
 {
     if (isset(self::$inflectors[$locale])) {
         return self::$inflectors[$locale];
     }
     return self::$inflectors[$locale] = new static(Inflections::get($locale));
 }