You could use the Zend_Registry.
In your bootstrap or wherever in your site just State
Zend_Registry::set("TagLine", "Have a Nice Day");
To use in a view just
<?= Zend_Registry::get("TagLine"); ?>
for extra credit you could also make a view helper for this (there is one with ZF2)
class My_View_Helper_Registry extends Zend_View_Helper_Abstract
{
public function registry($key)
{
return Zend_Registry::get($key);
}
}
In your bootstrap you will add a method like:
protected function _initSiteRegistry(){
Zend_Registry::set("Site_Name", "My Cool Site";
Zend_Registry::set("Site_TagLine", "Have a nice day";
}
Also if you are using the view helper approach you will also want to register the helper path.. you can do this in _initView in the bootstrap.
protected function _initView(){
$view = new Zend_View();
$view->doctype("HTML5");
$view->setEncoding("UTF-8");
$view->addScriptPath(APPLICATION_PATH."/local/views");
// set this as the viewRenderer's view.
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
$view->addHelperPath("My/View/Helper/", "My_View_Helper_");
return $view;
}