CakePHP 1.3 inflections?
-
20-09-2019 - |
Question
Where to put custom inflections in CakePHP 1.3?
Solution
inflections.php has been removed in CakePHP 1.3, I have taken a section out of the 1.3 migration guide which should explain:
Loading custom inflections
inflections.php has been removed, it was an unnecessary file hit, and the related features have been refactored into a method to increase their flexibility. You now use
Inflector::rules() to load custom inflections.
Inflector::rules('singular', array(
'rules' => array('/^(bil)er$/i' => '\1', '/^(inflec|contribu)tors$/i' => '\1ta'),
'uninflected' => array('singulars'),
'irregular' => array('spins' => 'spinor')
));
Will merge the supplied rules into the infection sets, with the added rules taking precedence over the core rules.
OTHER TIPS
Its under /app/config/inflections.php.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow