Home  >  Article  >  Backend Development  >  Cakephp learning notes—uppercase and lowercase, singular and plural

Cakephp learning notes—uppercase and lowercase, singular and plural

黄舟
黄舟Original
2016-12-20 09:37:051210browse

It’s been a while since I came into contact with cakephp and learned to use it! But even the most basic things cannot be written smoothly! Here I also take a note of the places where mistakes often occur during the learning process! I hope everyone can pay attention to it while learning!

1. My English is not good, words are written wrong, and pay attention to capitalization! It is often difficult to find, so everyone should learn more English and memorize more words! A For example: containable cannot be written as containable (first letters) and containabel (Le-& GT; EL);

class AppModel extends Model {
    var $actsAs = array('Containable');
}

2. Document names about the controller, model and view, lax and single plural, etc.!中 Personally think that in a single plural, the controller, data table name, and view folder are named plural; the model is named single!写 The file name is not as small as a lowercase, but please pay attention to the line (_) this stuff! There is capitalization in the code!

                                                                                                                                                received controller part)

Model: File name: received_note.php

code: re Rreee View: The folder name is plural. Such as: "users"

Please experience the capitalization, underlining and naming in cakephp! Once you are familiar with it, you will learn and develop more smoothly! Wish ya'll good luck!

The above are the Cakephp learning notes - uppercase and lowercase, singular and plural content. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn