Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>Bootstrap.php</code> allows for some advanced modification that you may require for you Zend project. It is used to load common coponents or resources that are used by all or most of your controller, view, etc. Its similar to a file <code>"common.php"</code> that we may use in case of non-framework project. </p> <p>In bootstrap you put the initial code that executes before anything else gets executed, here you can do the <code>autoloading, initialize your plugins, setting datetimezone</code>, etc.</p> <p>There are two types of bootstrap files in Zend Framework, one has the project level scope and is placed at <code>PROJECT_DIR/application/bootstrap.php</code>. And the other has module level scope and is placed at <code>PROJECT_DIR/application/modules/MODULE_NAME/bootstrap.php</code>.</p> <p>An example of the main bootstrap file (<code>PROJECT_DIR/application/bootstrap.php</code>) is:</p> <pre><code>class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initView() { // Initialize view ... } protected function _initTimeZone() { date_default_timezone_set('Asia/Kolkata'); } protected function _initAutoload() { // Add autoloader empty namespace $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader-&gt;setFallbackAutoloader(true); $admin_loader = new Zend_Application_Module_Autoloader(array( 'namespace' =&gt; 'Admin', 'basePath' =&gt;APPLICATION_PATH . '/modules/admin' )); return $autoloader; } protected function _initControllerPlugins() { // initialize your controller plugins here ... } protected function _initNavigation() { // initializing navigation ... } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload