Search code examples
phpzend-framework

Zend Framework-using bootstrap.php vs application.in? Confused about the difference


I'm working my way through some tutorials. I see the Zendcasts tutorials have me setting up a lot of things in the bootstrap.php file, while with the quickstart and other tutorials, don't even touch that file and do a lot of changes in the application.ini file.

What is the difference between the two and why use one over the other?

Thanks!


Solution

  • Application.ini is intended for configuring application to some extent, that original authors intended to be available to developer, and that developer could find useful most of the time.

    In other hand, using Bootstrap.php allows for some pretty advanced modifications that ZF authors didn't think of, like Configuring your Zend Framework application for multiple host.

    So, it depends what you want to accomplish, but mostly things that have to happen very early during request would have to work with Bootstrap.php.

    Hope it helps.