Configuring an application using init

Apart from having multiple kinds of configuration, we can have multiple entry points in advanced applications.

In advanced web applications, in fact, we also have a different approach in the development stage. We usually have two environments: development and production. In the first one, we make tests using fake users, data, and so on, while in the second one we must take care to guarantee the proper functioning of the project.

Therefore, we will have different sets of configuration files and parameters based on environments where we will work in.

We could wish, in fact, to test the application using the development database instead of the production database, or specific parameters available only in a specific ...

Get Yii2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.