src/Inflector.php
protected static function _inflect($type, $rule, $replacement, $locale)
    {
        $rules = & static::${$type};
        if (!isset($rules[$locale])) {
            $rules[$locale] = [];
        }
        $rules[$locale] = [$rule => $replacement] + $rules[$locale];
    }
protected static function _inflect($type, $rule, $replacement, $locale)
    {
        $rules = & static::${$type};
        if (!isset($rules[$locale])) {
            $rules[$locale] = [];
        }
        $rules[$locale] = [$rule => $replacement] + $rules[$locale];
    }
protected static function _inflect ( $ type , $ rule , $ replacement , $ locale ) { $ rules = & static :: $ { $ type } ; if ( ! isset ( $ rules [ $ locale ] ) ) { $ rules [ $ locale ] = [ ] ; } $ rules [ $ locale ] = [ $ rule => $ replacement ] + $ rules [ $ locale ] ; }
Set a new inflection rule and its replacement.

@param string $type        The inflection type.
@param string $rule        A regular expression.
@param string $replacement The replacement expression.
@param string $locale      The locale where this rule will be applied.
Set a new inflection rule and its replacement .