summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/styleguide.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-22 13:29:10 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-22 13:29:10 +0200
commit20292311636837e120d205e470e41826820feb46 (patch)
treebb9fa90e5b249369f6ad1e0e635e8ef3e2fdd13d /user_guide_src/source/general/styleguide.rst
parent2d536f848dae5b1781bdfbdaf914fed1010e72bf (diff)
Change class filenames to Ucfirst
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..1683b04cd 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
=======================