O'Reilly logo

Yii2 By Example by Fabrizio Caldarelli

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

Application properties

A Yii2 application can be configured through several properties.

The properties that need to be configured in any application are listed in the following table:

Properties

Description

id

This indicates a unique ID to distinguish this application from others. It is mainly used programmatically. An example of this property is basic.

basePath

This specifies the root directory of the application. This path is the starting point for all the other types of application objects, such as models, controllers, and views. An example of this property is dirname(__DIR__).

The other common properties are listed in the following table:

Properties

Description

aliases

This indicates an alias name for path definitions. They are ...

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