Inflector::rules
Adds custom inflection $rules, of either 'plural', 'singular' or 'transliteration' $type.
### Usage: {{{ Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables')); Inflector::rules('plural', array( 'rules' => array('/^(inflect)ors$/i' => '\1ables'), 'uninflected' => array('dontinflectme'), 'irregular' => array('red' => 'redlings') )); Inflector::rules('transliteration', array('/å/' => 'aa')); }}}
Signature
public function rules(string
$type,
array
$rules,
[boolean
$reset = false] )
Parameters
$type
— string- The type of inflection, either 'plural', 'singular' or 'transliteration'
$rules
— array- Array of rules to be added.
$reset
— boolean- If true, will unset default inflections for all
new rules that are being defined in $rules.
Returns
- void