tags:

views:

49

answers:

1

I wish to load some global defaults in my CakePHP application. E.g. app/config/defaults.php

$config['site']['name']='FooBar';
$config['secuity']['somelimit']=-1;

I'm going to use (Configuration::read()) these values across various classes not just in a single controller.

Where is the proper place to call Configuration::load('defaults')? In the router? In the subclass of App?

To clarify my objective: I would like Configuration::load('defaults') for loading global defaults. But I would not like to do this in every Router, Helper etc. Is there a global hook/constructor for CakePHP applications that is executed before anything else?

+1  A: 

I put that call into app/config/config.php

nickf