From 20292311636837e120d205e470e41826820feb46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 14:29:10 +0300 Subject: Change class filenames to Ucfirst --- user_guide_src/source/general/styleguide.rst | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/general/styleguide.rst') 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 ======================= -- cgit v1.2.3-24-g4f1b