Zend Framework: Documentation
来源:百度文库 编辑:神马文学网 时间:2024/04/29 01:20:46
Appendix C. Zend Framework Coding Standard for PHP
Table of Contents
- C.1. Overview
- C.1.1. Scope
- C.1.2. Goals
- C.1.1. Scope
- C.2. PHP File Formatting
- C.2.1. General
- C.2.2. Indentation
- C.2.3. Maximum Line Length
- C.2.4. Line Termination
- C.2.2. Indentation
- C.2.1. General
- C.3. Naming Conventions
- C.3.1. Classes
- C.3.2. Abstract Classes
- C.3.3. Interfaces
- C.3.4. Filenames
- C.3.5. Functions and Methods
- C.3.6. Variables
- C.3.7. Constants
- C.3.2. Abstract Classes
- C.3.1. Classes
- C.4. Coding Style
- C.4.1. PHP Code Demarcation
- C.4.2. Strings
- C.4.2.1. String Literals
- C.4.2.2. String Literals Containing Apostrophes
- C.4.2.3. Variable Substitution
- C.4.2.4. String Concatenation
- C.4.2.2. String Literals Containing Apostrophes
- C.4.2.1. String Literals
- C.4.3. Arrays
- C.4.3.1. Numerically Indexed Arrays
- C.4.3.2. Associative Arrays
- C.4.3.1. Numerically Indexed Arrays
- C.4.4. Classes
- C.4.4.1. Class Declaration
- C.4.4.2. Class Member Variables
- C.4.4.1. Class Declaration
- C.4.5. Functions and Methods
- C.4.5.1. Function and Method Declaration
- C.4.5.2. Function and Method Usage
- C.4.5.1. Function and Method Declaration
- C.4.6. Control Statements
- C.4.6.1. If/Else/Elseif
- C.4.6.2. Switch
- C.4.6.1. If/Else/Elseif
- C.4.7. Inline Documentation
- C.4.7.1. Documentation Format
- C.4.7.2. Files
- C.4.7.3. Classes
- C.4.7.4. Functions
- C.4.7.2. Files
- C.4.7.1. Documentation Format
- C.4.1. PHP Code Demarcation
C.1. Overview
C.1.1. Scope
This document provides guidelines for code formatting and documentation to individuals and teams contributing to Zend Framework. Many developers using Zend Framework have also found these coding standards useful because their code's style remains consistent with all Zend Framework code. It is also worth noting that it requires significant effort to fully specify coding standards.
Note: Sometimes developers consider the establishment of a standard more important than what that standard actually suggests at the most detailed level of design. The guidelines in Zend Framework's coding standards capture practices that have worked well on the Zend Framework project. You may modify these standards or use them as is in accordance with the terms of our license.
Topics covered in Zend Framework's coding standards include:
-
PHP File Formatting
-
Naming Conventions
-
Coding Style
-
Inline Documentation
C.1.2. Goals
Coding standards are important in any development project, but they are particularly important when many developers are working on the same project. Coding standards help ensure that the code is high quality, has fewer bugs, and can be easily maintained.