Explain naming convention in Yii 2 Framework ?

devquora
devquora

Posted On: Feb 22, 2018

 

Yii follows below naming conventions

  • You can define table prefix when using Gii. In your case, you need to set it to tbl_. Then it should generate UserController instead of TblUserController.
  • The Yii Framework employs a class naming convention whereby the names of the classes directly map to the directories in which they are stored. The root level directory of the Yii Framework is the “framework/” directory, under which all classes are stored hierarchically.
  • Class names may only contain alphanumeric characters. Numbers are permitted in class names but are discouraged. Dot (.) is only permitted in place of the path separator.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Yii 2 Interview Questions

    Which PHP version is required to install Yii 2.0 ?

    Which PHP version is required to install Yii 0 ?..

    Yii 2 Interview Questions

    What is latest version Yii 2 Framework ?

    The latest version of Yii 2 is 2.0.15, released on March 20, 2018...