From 5a8a455f19aa7fc57262cc740d45ebc531e34446 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 17 Aug 2009 18:06:30 +0000 Subject: changes some EE references to CI in the styleguide --- user_guide/general/styleguide.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html index a52ed5a5f..dbeb0f8e3 100644 --- a/user_guide/general/styleguide.html +++ b/user_guide/general/styleguide.html @@ -262,7 +262,7 @@ $parts = $this->foo($parts);

Constants

-

Constants follow the same guidelines as do variables, except constants should always be fully uppercase. Always use ExpressionEngine constants when appropriate, i.e. SLASH, LD, RD, PATH_CACHE, etc.

+

Constants follow the same guidelines as do variables, except constants should always be fully uppercase. Always use CodeIgniter constants when appropriate, i.e. SLASH, LD, RD, PATH_CACHE, etc.

INCORRECT: myConstant // missing underscore separator and not fully uppercase N // no single-letter constants @@ -364,7 +364,7 @@ function build_string($str = "")

Whitespace in Files

-

No whitespace can precede the opening PHP tag or follow the closing PHP tag. ExpressionEngine output is buffered, so whitespace in your files can cause output to begin before ExpressionEngine outputs its content, leading to errors and an inability for ExpressionEngine to send proper headers. In the examples below, select the text with your mouse to reveal the incorrect whitespace.

+

No whitespace can precede the opening PHP tag or follow the closing PHP tag. Output is buffered, so whitespace in your files can cause output to begin before CodeIgniter outputs its content, leading to errors and an inability for CodeIgniter to send proper headers. In the examples below, select the text with your mouse to reveal the incorrect whitespace.

INCORRECT:

@@ -407,7 +407,7 @@ class Pre_import mod.pre_import.php

Database Table Names

-

Any tables that your add-on might use must use the 'exp_' prefix, followed by a prefix uniquely identifying you as the developer or company, and then a short descriptive table name. You do not need to be concerned about the database prefix being used on the user's installation, as ExpressionEngine's database class will automatically convert 'exp_' to what is actually being used.

+

Any tables that your add-on might use must use the 'exp_' prefix, followed by a prefix uniquely identifying you as the developer or company, and then a short descriptive table name. You do not need to be concerned about the database prefix being used on the user's installation, as CodeIgniter's database class will automatically convert 'exp_' to what is actually being used.

INCORRECT: email_addresses // missing both prefixes @@ -425,7 +425,7 @@ exp_pre_email_addresses

One File per Class

-

Use separate files for each class your add-on uses, unless the classes are closely related. An example of ExpressionEngine files that contains multiple classes is the Database class file, which contains both the DB class and the DB_Cache class, and the Magpie plugin, which contains both the Magpie and Snoopy classes.

+

Use separate files for each class your add-on uses, unless the classes are closely related. An example of CodeIgniter files that contains multiple classes is the Database class file, which contains both the DB class and the DB_Cache class, and the Magpie plugin, which contains both the Magpie and Snoopy classes.

-- cgit v1.2.3-24-g4f1b