PHP Classes

File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/CodeIgniter/Docs/NamingConventions/ValidMethodNameStandard.xml

Recommend this page to a friend!
  Classes of Simo   CodeIgniter Plugin for Z-Ray   zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/CodeIgniter/Docs/NamingConventions/ValidMethodNameStandard.xml   Download  
File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/CodeIgniter/Docs/NamingConventions/ValidMethodNameStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CodeIgniter Plugin for Z-Ray
Show CodeIgniter application information in Z-Ray
Author: By
Last change:
Date: 2 years ago
Size: 1,512 bytes
 

Contents

Class file image Download
<documentation title="Function and Method Names"> <standard> <![CDATA[ Class names should always start with an uppercase letter. Multiple words should be separated with an underscore, and not CamelCased. All other class methods should be entirely lowercased and named to clearly indicate their function, preferably including a verb. Try to avoid overly long and verbose names. Methods and variables that are only accessed internally by your class, such as utility and helper functions that your public methods use for code abstraction, should be prefixed with an underscore. ]]> </standard> <code_comparison> <code title="Examples of valid method names"> <![CDATA[ function get_file_properties() // descriptive, underscore separator, and all lowercase letters private function _get_file_properties() ]]> </code> <code title="Examples of invalid method names"> <![CDATA[ function fileproperties() // not descriptive and needs underscore separator function fileProperties() // not descriptive and uses CamelCase function getfileproperties() // Better! But still missing underscore separator function getFileProperties() // uses CamelCase function get_the_file_properties_from_the_file() // wordy private function get_the_file_properties() // not prefixed with an underscor, though private function _get_the_file_properties() // prefixed with an underscor, though public ]]> </code> </code_comparison> </documentation>