|
Тема |
Автор |
Просмотров |
Ответов |
Последнее сообщение |
| Table of Contents |
Admin |
616 |
0 |
04.06.2013 21:25:48
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Table of Contents
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
Table of Contents
Overview 3
License 3
Scope 3
Note 3
Naming Convention 4
Classes 4
Folders 4
Filenames 4
Func7ons 4
Variables 5
Constants 5
Variables 6
PHP Code
php_fusion_7_02_coding_style_beta2_11_11_12.pdf :: Manual for coders php_fusion_7_02_coding_style_beta2_11_11_12.pdf
|
| Overview. License |
Admin |
397 |
0 |
04.06.2013 21:24:51
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Overview. License
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
This document is based upon the Zend Framework’s Coding Standard Manual. Licensed under New
BSD License and copyrights are applicable to porEons of Zend Framework. Copyright © 2005--Ѓ]
Zend
|
| Scope |
Admin |
397 |
0 |
04.06.2013 21:23:49
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Scope
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
This document provides guidelines for code formaRng and documentaEon to individuals and
teams contribuEng to PHP-Fusion. Many developers using PHP-Fusion have also found these
coding standards useful because
|
| Note |
Admin |
363 |
0 |
04.06.2013 21:22:59
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Note
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
SomeEmes 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 PHP-Fusion's
coding standards
|
| Naming Convention. Classes |
Admin |
428 |
0 |
04.06.2013 21:21:09
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Naming Convention. Classes
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
Class names may only contain alphanumeric characters. Numbers are permiLed in class names but
are discouraged in most cases. Underscores are not permiLed.
If a class name is comprised
|
| Folders |
Admin |
405 |
0 |
04.06.2013 21:17:39
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Folders
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
Only alphanumeric characters and underscores are permiLed. Spaces are strictly prohibited. New
words are separated by underscores and the .rst leLer of each new word, including the .rst work,
must be
|
| Filenames |
Admin |
386 |
0 |
04.06.2013 21:16:27
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Filenames
PHP-Fusion Coding Style
PHP-Fusion version 7.02.00
Only alphanumeric characters and underscores are permiLed. Spaces are strictly prohibited. New
words are separated by underscores and the .rst leLer of each new word, including the .rst work,
must be
|
| Functions |
Admin |
326 |
0 |
04.06.2013 21:15:12
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Functions
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Function names may only contain alphanumeric characters. Underscores are not permiLed.
Numbers are permiLed in funcEon names but are discouraged in most cases.
FuncEon names must always start with a lowercase leLer.
|
| Variables |
Admin |
471 |
0 |
04.06.2013 21:13:47
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Variables
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Variable names may only contain alphanumeric characters. Underscores are not permiLed.
Numbers are permiLed in variable names but are discouraged in most cases.
For instance variables that are declared with
|
| Constants |
Admin |
371 |
0 |
04.06.2013 21:11:54
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Constants
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Constants may contain both alphanumeric characters and underscores. Numbers are permiLed in
constant names.
All leLers used in a constant name must be capitalised, while all words in a constant name must be
|
| Variables. PHP Code Demarcation |
Admin |
417 |
0 |
04.06.2013 21:08:32
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
PHP code must always be delimited by the full--Ѓ] form, standard PHP tags:
1.
Short tags or not adding ?> at the end of a PHP .le are never allowed.
String Literals
When a string is literal (contains no variable subsEtuEons), "double quotes" should always be used
to demarcate the
|
| Variable Substitution |
Admin |
360 |
0 |
04.06.2013 21:06:06
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Variable Substitution
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Variable subsEtuEon is permiLed using this form:
PHP <?php $greeting = "Hello .$name. ", welcome back!"; ?>
For consistency, this form is
|
| String Concatenation |
Admin |
402 |
0 |
04.06.2013 21:04:47
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
String Concatenation
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Strings must be concatenated using the "." operator. A space must never be added before or amer
the ".":
PHP <?php $company = "PHP- Fusion"
|
| Numerically Indexed Arrays |
Admin |
388 |
0 |
04.06.2013 21:02:49
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Numerically Indexed Arrays
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
NegaEve numbers are not permiLed as indices.
An indexed array may start with any non--Ѓ] negaEve number, however all base indices besides 0 are discouraged.
When declaring indexed arrays with
|
| Associative Arrays |
Admin |
389 |
0 |
04.06.2013 21:00:03
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Associative Arrays
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
When declaring associaEve arrays with the Array construct, the iniEal array item must begin on
the following line. It should be padded at one indentaEon level greater than the line containing the
|
| Classes and functions. Class Declaration |
Admin |
389 |
0 |
04.06.2013 20:57:22
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Classes and functions. Class Declaration
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Classes must be named according to PHP-Fusion's naming convenEons. The brace should always be
wriLen on the same line as the class name. All code in a class must be indented
|
| Class Member Variables |
Admin |
443 |
0 |
04.06.2013 20:55:27
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Class Member Variables
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Member variables must be named according to PHP-Fusion's variable naming convenEons. Any
variables declared in a class must be listed at the top of the class, above the declaraEon of any
|
| Function and Method Declaration |
Admin |
427 |
0 |
04.06.2013 20:52:59
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Function and Method Declaration
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Functions must be named according to PHP-Fusion's funcEon naming convenEons. Methods inside
classes must always declare their visibility by using one of the private, protected, or public
|
| Function and Method Usage |
Admin |
379 |
0 |
04.06.2013 20:50:04
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Function and Method Usage
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Function arguments should be separated by a single trailing space amer the comma delimiter. The
following is an example of an acceptable invocaEon of a funcEon that takes three arguments:
PHP
|
| Control Statements: if / else / elseif |
Admin |
384 |
0 |
04.06.2013 20:40:46
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Control Statements if / else / elseif
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Control statements based on the if and elseif constructs must have a single space before the
opening parenthesis of the condiEonal and a single space amer the closing parenthesis
|
| Switch |
Admin |
391 |
0 |
04.06.2013 20:38:39
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Switch
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Control statements wriLen with the "switch" statement must have a single space before the
opening parenthesis of the condiEonal statement and amer the closing parenthesis.
All content within the "switch" statement
|
| For |
Admin |
451 |
0 |
04.06.2013 20:22:52
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
For
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Control statements wriLen with the "for" statement must have a single space before the opening
parenthesis of the condiEonal statement and amer the closing parenthesis.
The opening brace is wriLen on the same line
|
| Comments |
Admin |
333 |
0 |
04.06.2013 20:20:58
Admin |
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
Comments
PHP-Fusion Coding Style PHP-Fusion version 7.02.00
Header comment
All files must at the line below
|