Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where to define constants in cakephp

In which file should I define application-wide constants that are specific to my cakephp app?

like image 330
Tomba Avatar asked Oct 04 '10 18:10

Tomba


1 Answers

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:

  1. Defining convenience functions.
  2. Registering global constants.
  3. Defining additional model, view, and controller paths.
  4. Creating cache configurations.
  5. Configuring inflections.
  6. Loading configuration files.

Complete manual goes here

like image 67
Travis Leleu Avatar answered Nov 15 '22 13:11

Travis Leleu