php - Where to Define Constants with Zend Framework -


i have few genuine constants use in zend framework. know can set them in index.php not executed when running phpunit tests. (not in case, anyhow).

how else can set these within framework? problem constants need declared outside class. (i don't want class constants).

if else fails, can set them in unit testing bootstrap, i'd avoid duplication if possible.

i define them in bootstrap file. use zend_registry instead of constants.

zend_registry::set('property1', 'value1');  //everywhere in code $value = zend_registry::get('property1'); 

Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -