views:

236

answers:

2

Where do I put my inflections in CakePHP 1.3? I am new to Cake

A: 

Its under /app/config/inflections.php.

tr4656
Should it already be there? Because I don't see it.
PythonGem
Sorry. Thought you were talking about CakePHP 1.2. In 1.3, you must define them in app/config/bootstrap.php using Inflector::rules().
tr4656
+3  A: 

inflections.php has been removed in cakephp 1.3, i have taken a bit out of the 1.3 migration guide which should explain it:

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.

Source

Shard