CakePHP Encoding Guidelines: Why are some camelCased properties instead of CamelCased?

Just a quick question:

When searching for Controller.php :

What is the main convention for encoding property names? I always thought that properties that reference an object start with a capital letter, while basic properties that reference booleans / strings / ints start with a lowercase letter.

But in Controller.php there is:

public $request; // referencing an instance of a CakeRequest object public $View; // referencing an instance of a View

So where is the difference?

+4
source share
2 answers

General rule regarding variable and property shell :

camelBack . , ,

.

/from:

  • , ,
  • =)
+2

, , , . CakePHP , CamelCase. , , request, , request. , .

, , , camelBacked, , , , , .., - CamelCased.

+1

Source: https://habr.com/ru/post/1538748/


All Articles