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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -