In which file should I define application-wide constants that are specific to my cakephp app?
There is a another way to set constants in external file except doing it in long files like bootstrap (When it's doesn't effect on Behaviors like editable Pdf constants).
It could be retrieved from view, controller or model:
Configure::load('PDF_CONSTANT_FILE');
echo THE_CONSTANT;
// PDF_CONSTANT_FILE set in app/config/PDF_CONSTANT_FILE.php
Adding $config=array(); to PDF_CONSTANT_FILE.php file at start is necessary.
Just for general benefit.
@travis:
i think its better to use the configs file (and configure class) for such dev/staging stuff
the bootstrap is more like the "general" more hardcoded stuff - all app configs together the configs are the "variant" config arrays.
just my 5 cents.
I define them in app/config/bootstrap.php
Bootstrapping CakePHP
If you have any additional configuration needs, use CakePHP’s bootstrap file, found in app/Config/bootstrap.php. This file is executed just after CakePHP’s core bootstrapping.
This file is ideal for a number of common bootstrapping tasks:
Complete manual goes here