@@ 515-517 (lines=3) @@ | ||
512 | return static::$_cache['pluralize'][$word]; |
|
513 | } |
|
514 | ||
515 | if (!isset(static::$_cache['uninflected'])) { |
|
516 | static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')'; |
|
517 | } |
|
518 | ||
519 | if (preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) { |
|
520 | static::$_cache['pluralize'][$word] = $word; |
|
@@ 545-547 (lines=3) @@ | ||
542 | return static::$_cache['singularize'][$word]; |
|
543 | } |
|
544 | ||
545 | if (!isset(static::$_cache['irregular']['singular'])) { |
|
546 | static::$_cache['irregular']['singular'] = '(?:' . implode('|', static::$_irregular) . ')'; |
|
547 | } |
|
548 | ||
549 | if (preg_match('/(.*?(?:\\b|_))(' . static::$_cache['irregular']['singular'] . ')$/i', $word, $regs)) { |
|
550 | static::$_cache['singularize'][$word] = $regs[1] . substr($regs[2], 0, 1) . |
|
@@ 555-557 (lines=3) @@ | ||
552 | return static::$_cache['singularize'][$word]; |
|
553 | } |
|
554 | ||
555 | if (!isset(static::$_cache['uninflected'])) { |
|
556 | static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')'; |
|
557 | } |
|
558 | ||
559 | if (preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) { |
|
560 | static::$_cache['pluralize'][$word] = $word; |