php - How to call a function inside the bootstrap from a model in Zend? -


i have function on bootstrap.php like:

function test() {     echo "hello"; } 

i want call model. know can controller using $this->getfrontcontroller()->getparam('bootstrap')->test(); no clue on how model. help?

i know it's not best have function on bootstrap , better have elsewhere, can't happen.

you can front controller anywhere in application using zend.controller.front.methods.primary.getinstance

$front = zend_controller_front::getinstance();   

so think give result

$front = zend_controller_front::getinstance();   $front->getparam('bootstrap')->test(); 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -