Zend_Application & Boostrap – A hidden secret
From Zend Framework 1.8, the way to use ZF is changed, Zend_Application and Zend_Application_Resource have improved exponentially the way to start up a ZF project.
In this short post I don’t want to show you how to use them, but I want to give you a simple hidden secret.
If you have already used them you know that to launch your ZF application you need to add these lines to your application.ini
bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap"
and create the file boostrapp.php with the following code
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
}
This is the best boostrapp that you can have, without any method. You can obtain this moving all your methods on the resources.
But if I have an empty class why should I create this file?
There is a little tip to remove this file from execution of your scripts, you have to change the previous lines of your application.ini with these
bootstrap.path = APPLICATION_PATH "/../library/Zend/Application/Bootstrap/Bootstrap.php" bootstrap.class = "Zend_Application_Bootstrap_Bootstrap"
Opensource Development June 14, 2011 07:27:25
Zend have gone through many relevant changes.Using the Bootstrap in such a way is really helpful.Thanks for sharing it.
Tarig November 21, 2011 22:15:43
I have an a website that blocked by zend how can open the web as open source???
Gman January 22, 2012 18:39:14
When some one searches for his required thing, thus he/she desires to be available that in detail, therefore that thing is maintained over here.