tp5.1中的命名规范

类里边用驼峰(类名首字母大写,属性和方法首字母小写)

  类名:User,UserType

  类中的属性和方法:getUserName(),tableName,instance

 

参数、数据表和字段 用小写字母+下划线

  参数:user_route_on

  数据表和字段:think_user,user_name

 

常量、环境变量 用大写字母+下划线 

  常量:APP_PATH

  数据表和字段:APP_DEBUG

posted @ 2019-05-02 11:17  254980080  阅读(967)  评论(0编辑  收藏  举报