what’s the diff:
$application = new Zend_Application(...);
$application->bootstrap()->run();
$application = new Zend_Application(...);
$application->run();
why we need call ->bootstrape then call ->run? why not just call application->run ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
from the Zend Sources class:Zend_Application, file:application.php
The first sample
calls Zend_Application_Bootstrap_Bootstrap::bootstrap method which ends up loading all the resources.
Then it calls
Zend_Application_Bootstrap_Bootstrap::run()which actually dispatches the request.The second sample
according to the code above is skipping the first step, so it will try to run (dispatch the request) without actually loading the resources.
This is how Zend describes bootstrapping and resources.