summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/styleguide.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-20 14:03:43 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-20 14:03:43 +0100
commitea801ab4ab80042638ffddc6056483a1ec43fa80 (patch)
treef75f30c0df6a8f861ca7df22af09fa3240b0bbd6 /user_guide_src/source/general/styleguide.rst
parent1c08d557a21ecb0f79cd1a1de4e06817a26e0537 (diff)
parent4d0571666d03511ac5b4a1f2a6882ccb1509a209 (diff)
Merge branch 'develop' into feature/user-guide-cleanup
Diffstat (limited to 'user_guide_src/source/general/styleguide.rst')
-rw-r--r--user_guide_src/source/general/styleguide.rst31
1 files changed, 30 insertions, 1 deletions
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index 144b362f5..5613eabec 100644
--- a/user_guide_src/source/general/styleguide.rst
+++ b/user_guide_src/source/general/styleguide.rst
@@ -71,13 +71,42 @@ identify a file as being complete and not truncated.
echo "Here's my code!";
- /* End of file myfile.php */
+ /* End of file Myfile.php */
/* Location: ./system/modules/mymodule/myfile.php */
.. note:: There should be no empty line or newline character(s) following
the closing comments. If you happen to see one when
submitting a pull request, please check your IDE settings and fix it.
+File Naming
+===========
+
+Class files must be named in a Ucfirst-like manner, while any other file name
+(configurations, views, generic scripts, etc.) should be in all lowercase.
+
+**INCORRECT**::
+
+ somelibrary.php
+ someLibrary.php
+ SOMELIBRARY.php
+ Some_Library.php
+
+ Application_config.php
+ Application_Config.php
+ applicationConfig.php
+
+**CORRECT**::
+
+ Somelibrary.php
+ Some_library.php
+
+ applicationconfig.php
+ application_config.php
+
+Furthermore, class file names should match the name of the class itself.
+For example, if you have a class named `Myclass`, then its filename must
+be **Myclass.php**.
+
Class and Method Naming
=======================