Here are some basic instructions to setting up global variables in Zend Framework using the application.ini file (application/configs/application.ini):
1) Create a service name for your global variable in application.ini. Usually, you group them by the API name.
For instance, if you have an API called “myapi” and you want to store a global variable myvar = “1234”. Add the following line to your application.ini
myapi.myvar = 1234
2) In your controller, use the following code to access the global variable:
$myapi = $this->getInvokeArg('bootstrap')->getOption('myapi');
$myvar = $myapi["myvar"];