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

html - Cut text on left side inside button while centering -

What design pattern is this code in Javascript? -

java - Last square of 8x8 grid not drawn, using two nested FOR loops -