From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- user_guide/general/alternative_php.html | 16 ++++---- user_guide/general/autoloader.html | 2 +- user_guide/general/caching.html | 8 ++-- user_guide/general/common_functions.html | 6 +-- user_guide/general/controllers.html | 32 +++++++-------- user_guide/general/core_classes.html | 4 +- user_guide/general/creating_libraries.html | 26 ++++++------ user_guide/general/credits.html | 2 +- user_guide/general/drivers.html | 6 +-- user_guide/general/environments.html | 40 +++++++++---------- user_guide/general/errors.html | 18 ++++----- user_guide/general/helpers.html | 26 ++++++------ user_guide/general/hooks.html | 16 ++++---- user_guide/general/libraries.html | 2 +- user_guide/general/managing_apps.html | 8 ++-- user_guide/general/models.html | 18 ++++----- user_guide/general/profiling.html | 2 +- user_guide/general/reserved_names.html | 4 +- user_guide/general/routing.html | 12 +++--- user_guide/general/security.html | 26 ++++++------ user_guide/general/styleguide.html | 64 +++++++++++++++--------------- user_guide/general/urls.html | 8 ++-- user_guide/general/views.html | 28 ++++++------- 23 files changed, 187 insertions(+), 187 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html index abd5845ff..574ab35d7 100644 --- a/user_guide/general/alternative_php.html +++ b/user_guide/general/alternative_php.html @@ -58,19 +58,19 @@ Alternate PHP Syntax

Alternate PHP Syntax for View Files

If you do not utilize CodeIgniter's template engine, you'll be using pure PHP -in your View files. To minimize the PHP code in these files, and to make it easier to identify the code blocks it is recommended that you use -PHPs alternative syntax for control structures and short tag echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, +in your View files. To minimize the PHP code in these files, and to make it easier to identify the code blocks it is recommended that you use +PHPs alternative syntax for control structures and short tag echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, and eliminate "echo" statements.

Automatic Short Tag Support

Note: If you find that the syntax described in this page does not work on your server it might be that "short tags" are disabled in your PHP ini file. CodeIgniter will optionally rewrite short tags on-the-fly, -allowing you to use that syntax even if your server doesn't support it. This feature can be enabled in your +allowing you to use that syntax even if your server doesn't support it. This feature can be enabled in your config/config.php file.

Please note that if you do use this feature, if PHP errors are encountered -in your view files, the error message and line number will not be accurately shown. Instead, all errors +in your view files, the error message and line number will not be accurately shown. Instead, all errors will be shown as eval() errors.

@@ -89,7 +89,7 @@ will be shown as eval() errors.

Alternative Control Structures

Controls structures, like if, for, foreach, and while can be -written in a simplified format as well. Here is an example using foreach:

+written in a simplified format as well. Here is an example using foreach:

<ul>
@@ -102,14 +102,14 @@ written in a simplified format as well. Here is an example using foreach:


</ul>
-

Notice that there are no braces. Instead, the end brace is replaced with endforeach. +

Notice that there are no braces. Instead, the end brace is replaced with endforeach. Each of the control structures listed above has a similar closing syntax: endif, endfor, endforeach, and endwhile

-

Also notice that instead of using a semicolon after each structure (except the last one), there is a colon. This is +

Also notice that instead of using a semicolon after each structure (except the last one), there is a colon. This is important!

-

Here is another example, using if/elseif/else. Notice the colons:

+

Here is another example, using if/elseif/else. Notice the colons:

<?php if ($username == 'sally'): ?>
diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index fae0b5fd9..405dda30f 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -75,7 +75,7 @@ consider auto-loading them for convenience.

loaded to the autoload array. You'll find instructions in that file corresponding to each type of item.

-

Note: Do not include the file extension (.php) when adding items to the autoload array.

+

Note: Do not include the file extension (.php) when adding items to the autoload array.

diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index c77f9a15d..abfe6ded9 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -68,8 +68,8 @@ By caching your pages, since they are saved in their fully rendered state, you c

How Does Caching Work?

Caching can be enabled on a per-page basis, and you can set the length of time that a page should remain cached before being refreshed. -When a page is loaded for the first time, the cache file will be written to your application/cache folder. On subsequent page loads the cache file will be retrieved -and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.

+When a page is loaded for the first time, the cache file will be written to your application/cache folder. On subsequent page loads the cache file will be retrieved +and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.

Note: The Benchmark tag is not cached so you can still view your page load speed when caching is enabled.

@@ -90,8 +90,8 @@ most logical to you. Once the tag is in place, your pages will begin being cache

Deleting Caches

-

If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires. Note: -Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you +

If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires. Note: +Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you will need to manually delete it from your cache folder.

diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index bfac32685..3c7a5df9e 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -68,7 +68,7 @@ Auto-loading Resources     $str = quoted_printable_encode($str);
}
-

Returns boolean TRUE if the installed version of PHP is equal to or greater than the supplied version number. Returns FALSE if the installed version of PHP is lower than the supplied version number.

+

Returns boolean TRUE if the installed version of PHP is equal to or greater than the supplied version number. Returns FALSE if the installed version of PHP is lower than the supplied version number.

is_really_writable('path/to/file')

@@ -92,10 +92,10 @@ else

set_status_header(code, 'text');

-

Permits you to manually set a server status header. Example:

+

Permits you to manually set a server status header. Example:

set_status_header(401);
-// Sets the header as: Unauthorized
+// Sets the header as: Unauthorized

See here for a full list of headers.

diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index c90916472..01ef3d1ff 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -91,7 +91,7 @@ Controllers

Let's try it:  Hello World!

-

Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it:

+

Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it:

-

If you visit your site using the URL you did earlier you should see your new view. The URL was similar to this:

+

If you visit your site using the URL you did earlier you should see your new view. The URL was similar to this:

example.com/index.php/blog/

Loading multiple views

-

CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more than one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:

+

CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more than one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:

<?php

class Page extends CI_Controller {

   function index()
   {
-      $data['page_title'] = 'Your title';
+      $data['page_title'] = 'Your title';
      $this->load->view('header');
      $this->load->view('menu');
      $this->load->view('content', $data);
@@ -132,8 +132,8 @@ class Page extends CI_Controller {

?>

In the example above, we are using "dynamically added data", which you will see below.

Storing Views within Sub-folders

-

Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need -to include the folder name loading the view. Example:

+

Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need +to include the folder name loading the view. Example:

$this->load->view('folder_name/file_name'); @@ -159,7 +159,7 @@ $this->load->view('blogview', $data);

Note: If you use an object, the class variables will be turned into array elements.

-

Let's try it with your controller file. Open it add this code:

+

Let's try it with your controller file. Open it add this code:

-

Note: You'll notice that in the example above we are using PHP's alternative syntax. If you +

Note: You'll notice that in the example above we are using PHP's alternative syntax. If you are not familiar with it you can read about it here.

Returning views as data

There is a third optional parameter lets you change the behavior of the function so that it returns data as a string -rather than sending it to your browser. This can be useful if you want to process the data in some way. If you -set the parameter to true (boolean) it will return data. The default behavior is false, which sends it -to your browser. Remember to assign it to a variable if you want the data returned:

+rather than sending it to your browser. This can be useful if you want to process the data in some way. If you +set the parameter to true (boolean) it will return data. The default behavior is false, which sends it +to your browser. Remember to assign it to a variable if you want the data returned:

$string = $this->load->view('myfile', '', true); -- cgit v1.2.3-24-g4f1b