O'Reilly logo

Zend Framework 2 Cookbook by Josephus Callaars

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using configurations to your benefit

Configurations play a crucial role in the workings of Zend Framework 2, therefore it is essential to know how it works.

How to do it…

Go through the following sections to use configurations to your benefit:

Creating a global configuration

When beginning to code in Zend Framework 2 there is some misunderstanding as to what the different configuration files do. By default we have multiple configuration files, and it might not always be simple to understand where things need to go. That is why we like to apply a simple rule:

Note

Is the configuration necessary throughout all our modules? If yes, place your configuration in the config/application.config.php file. If not, place your configuration in the config/global.php ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required