Where is the best place to create a class that contain all the application constant variables ?
is it :
– Bootstrap
– In the Application Common library
for example :
1- When i retrieve an image name from a database if this record doesnt have an image , i want to put a default value somewhere so i can use it in my models
** a constants that i use in all my application so if i change it , i dont want to go back to all in my code and change it everywhere
application.ini is the best place for example define some constant there
Then in your bootstrap do
ZF take ‘constants’ from config and call setConstants method in your bootstrap passing all lines prefixed by constants hence its an array .