From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- user_guide/general/alternative_php.html | 10 +++++----- user_guide/general/ancillary_classes.html | 6 +++--- user_guide/general/autoloader.html | 2 +- user_guide/general/caching.html | 6 +++--- user_guide/general/changelog.html | 4 ++-- user_guide/general/controllers.html | 22 +++++++++++----------- user_guide/general/core_classes.html | 6 +++--- user_guide/general/creating_libraries.html | 20 ++++++++++---------- user_guide/general/credits.html | 4 ++-- user_guide/general/errors.html | 14 +++++++------- user_guide/general/helpers.html | 6 +++--- user_guide/general/hooks.html | 22 +++++++++++----------- user_guide/general/index.html | 10 +++++----- user_guide/general/libraries.html | 4 ++-- user_guide/general/models.html | 12 ++++++------ user_guide/general/multiple_apps.html | 2 +- user_guide/general/plugins.html | 8 ++++---- user_guide/general/profiling.html | 2 +- user_guide/general/quick_reference.html | 2 +- user_guide/general/requirements.html | 2 +- user_guide/general/routing.html | 14 +++++++------- user_guide/general/scaffolding.html | 10 +++++----- user_guide/general/security.html | 12 ++++++------ user_guide/general/urls.html | 10 +++++----- user_guide/general/views.html | 8 ++++---- 25 files changed, 109 insertions(+), 109 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html index a06a208ee..2e2e562e9 100644 --- a/user_guide/general/alternative_php.html +++ b/user_guide/general/alternative_php.html @@ -12,7 +12,7 @@ @@ -62,8 +62,8 @@ Alternate PHP Syntax

Alternate PHP Syntax for View Files

-

If you do not utilize Code Igniter'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 +

If you do not utilize Code Igniter'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 echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, and eliminate "echo" statements.

@@ -83,7 +83,7 @@ be that "short tags" are disabled in your PHP ini file.

Alternative Control Structures

-

Controls structures, like if, for, foreach, and while can be +

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

@@ -101,7 +101,7 @@ written in a simplified format as well. Here is an example using foreach:

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:

diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html index f04556dea..71d88f3b9 100644 --- a/user_guide/general/ancillary_classes.html +++ b/user_guide/general/ancillary_classes.html @@ -12,7 +12,7 @@ @@ -62,7 +62,7 @@ Creating Ancillary Classes

Creating Ancillary Classes

-

In some cases you may want to develop classes that exist apart from your controllers but have the ability to +

In some cases you may want to develop classes that exist apart from your controllers but have the ability to utilize all of Code Igniter's resources. This is easily possible as you'll see.

get_instance()

@@ -80,7 +80,7 @@ This function returns the main Code Igniter object.

etc.
-

$this, however, only works within your controllers, your models, or your views. +

$this, however, only works within your controllers, your models, or your views. If you would like to use Code Igniter's classes from within your own custom classes you can do so as follows:

diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index 36893e916..bbb839dd7 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -12,7 +12,7 @@ diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index 6b4c3d1a5..1e3a6bcad 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -12,7 +12,7 @@ @@ -66,7 +66,7 @@ Page Caching

Code Igniter lets you cache your pages in order to achieve maximum performance. Although Code Igniter is quite fast, the amount of dynamic information you display in your pages will correlate directly to the -server resources, memory, and processing cycles utilized, which affect your page load speeds. +server resources, memory, and processing cycles utilized, which affect your page load speeds. By caching your pages, since they are saved in their fully rendered state, you can achieve performance that nears that of static web pages. @@ -94,7 +94,7 @@ 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 not longer be refreshed when it expires. Note: +

If you no longer wish to cache a file you can remove the caching tag and it will not 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/changelog.html b/user_guide/general/changelog.html index 7b2617917..44412b960 100644 --- a/user_guide/general/changelog.html +++ b/user_guide/general/changelog.html @@ -12,7 +12,7 @@ @@ -163,7 +163,7 @@ Change Log
  • Fixed a bug in which loading a language file was producing a "file contains no data" message.
  • Fixed a session bug caused by the XSS Filtering feature inadvertently changing the case of certain words.
  • Fixed some missing prefixes when using the database prefix feature.
  • -
  • Fixed a typo in the Calendar class (cal_november).
  • +
  • Fixed a typo in the Calendar class (cal_november).
  • Fixed a bug in the form_checkbox() helper.
  • Fixed a bug that was allowing the second segment of the URI to be identical to the class name.
  • Fixed an evaluation bug in the database initialization function.
  • diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index f83cab89f..fd6a4bdf0 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -12,7 +12,7 @@ @@ -137,14 +137,14 @@ class blog extends Controller {
    }
    ?> -

    Also, always make sure your controller extends the parent controller class so that it can inherit all its functions.

    +

    Also, always make sure your controller extends the parent controller class so that it can inherit all its functions.

    Functions

    -

    In the above example the function name is index(). The "index" function is always loaded by default if the +

    In the above example the function name is index(). The "index" function is always loaded by default if the second segment of the URI is empty. Another way to show your "Hello World" message would be this:

    www.your-site.com/index.php/blog/index/ @@ -208,8 +208,8 @@ passed to your function will be the re-routed ones.

    Defining a Default Controller

    -

    Code Igniter can be told to load a default controller when a URI is not present, -as will be the case when only your site root URL is requested. To specify a default controller, open +

    Code Igniter can be told to load a default controller when a URI is not present, +as will be the case when only your site root URL is requested. To specify a default controller, open your application/config/routes.php file and set this variable:

    $route['default_controller'] = 'Blog'; @@ -230,8 +230,8 @@ Code Igniter permits you to override this behavior through the use of the _     // Some code here...
    } -

    Important:  If your controller contains a function named _remap(), it will always -get called regardless of what your URI contains. It overrides the normal behavior in which the URI determines which function is called, +

    Important:  If your controller contains a function named _remap(), it will always +get called regardless of what your URI contains. It overrides the normal behavior in which the URI determines which function is called, allowing you to define your own function routing rules.

    The overridden function call (typically the second segment of the URI) will be passed as a parameter the _remap() function:

    @@ -256,11 +256,11 @@ allowing you to define your own function routing rules.

    Processing Output

    Code Igniter has an output class that takes care of sending your final rendered data to the web browser automatically. More information on this can be found in the -Views and Output class pages. In some cases, however, you might want to -post-process the finalized data in some way and send it to the browser yourself. Code Igniter permits you to +Views and Output class pages. In some cases, however, you might want to +post-process the finalized data in some way and send it to the browser yourself. Code Igniter permits you to add a function named _output() to your controller that will receive the finalized output data. -

    Important:  If your controller contains a function named _output(), it will always +

    Important:  If your controller contains a function named _output(), it will always be called by the output class instead of echoing the finalized data directly. The first parameter of the function will contain the finalized output.

    Here is an example:

    @@ -364,7 +364,7 @@ Constructors can't return a value, but they can do some default work.

    Reserved Function Names

    -

    Since your controller classes will extend the main application controller you +

    Since your controller classes will extend the main application controller you must be careful not to name your functions identically to the ones used by that class, otherwise your local functions will override them. The following is a list of reserved names. Do not name your controller functions any of these:

    diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html index 6d2f3804f..c5d021e63 100644 --- a/user_guide/general/core_classes.html +++ b/user_guide/general/core_classes.html @@ -12,7 +12,7 @@ @@ -69,7 +69,7 @@ It is possible, however, to swap any of the core system classes with your own ve but the option to replace or extend them does exist for those who would like to significantly alter the Code Igniter core.

    -

    Note:  Messing with a core system class has a lot of implications, so make sure you +

    Note:  Messing with a core system class has a lot of implications, so make sure you know what you are doing before attempting it.

    @@ -118,7 +118,7 @@ Extending a class is nearly identical to replacing a class with a couple excepti

    For example, to extend the native Input class you'll create a file named application/libraries/MY_Input.php, and declare your class with:

    diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index d76464120..12f8f9fc9 100644 --- a/user_guide/general/creating_libraries.html +++ b/user_guide/general/creating_libraries.html @@ -12,7 +12,7 @@ @@ -63,11 +63,11 @@ Creating Libraries

    Creating Libraries

    When we use the term "Libraries" we are normally referring to the classes that are located in the libraries -directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create -your own libraries within your application/libraries directory in order to maintain separation between your local resources +directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create +your own libraries within your application/libraries directory in order to maintain separation between your local resources and the global framework resources.

    -

    As an added bonus, Code Igniter permits your libraries to extend native classes if you simply need to add some functionality +

    As an added bonus, Code Igniter permits your libraries to extend native classes if you simply need to add some functionality to an existing library. Or you can even replace native libraries just by placing identically named versions in your application/libraries folder.

    In summary:

    @@ -86,7 +86,7 @@ nor can the main Controller class. All other classes are able to be replaced/ex

    Storage

    -

    Your library classes should be placed within your application/libraries folder, as this is where Code Igniter will look for them when +

    Your library classes should be placed within your application/libraries folder, as this is where Code Igniter will look for them when they are initialized.

    @@ -120,7 +120,7 @@ class Someclass {
    $this->load->library('someclass'); -

    Where someclass is the file name, without the ".php" file extension. You can submit the file name capitalized or lower case. +

    Where someclass is the file name, without the ".php" file extension. You can submit the file name capitalized or lower case. Code Igniter doesn't care.

    Once loaded you can access your class using the lower case version:

    @@ -132,7 +132,7 @@ Code Igniter doesn't care.

    Passing Parameters When Initializing Your Class

    -

    In the library loading function you can dynamically pass data via the second parameter and it will be passed to your class +

    In the library loading function you can dynamically pass data via the second parameter and it will be passed to your class constructor:

    @@ -178,7 +178,7 @@ This function returns the Code Igniter super object.

    etc.
    -

    $this, however, only works directly within your controllers, your models, or your views. +

    $this, however, only works directly within your controllers, your models, or your views. If you would like to use Code Igniter's classes from within your own custom classes you can do so as follows:

    @@ -231,7 +231,7 @@ Extending a class is nearly identical to replacing a class with a couple excepti

    For example, to extend the native Email class you'll create a file named application/libraries/MY_Email.php, and declare your class with:

    @@ -261,7 +261,7 @@ to load the example above, which extends the Email class, you will use:

    $this->load->library('email'); -

    Once loaded you will use the class variable as you normally would for the class you are extending. In the case of +

    Once loaded you will use the class variable as you normally would for the class you are extending. In the case of the email class all calls will use: diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html index 770b01189..45554904f 100644 --- a/user_guide/general/credits.html +++ b/user_guide/general/credits.html @@ -12,7 +12,7 @@ @@ -65,7 +65,7 @@ Credits

    Code Igniter was developed by Rick Ellis, who in his other life is CEO of pMachine, Inc. The core framework was written specifically for this application, while many of the class libraries, helpers, and sub-systems borrow from the code-base of -ExpressionEngine, a Content Management System written by Rick Ellis and +ExpressionEngine, a Content Management System written by Rick Ellis and Paul Burdick.

    A hat tip goes to Ruby on Rails for inspiring us to create a PHP framework, and for diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html index 16db19e41..70ee10213 100644 --- a/user_guide/general/errors.html +++ b/user_guide/general/errors.html @@ -12,7 +12,7 @@ @@ -62,15 +62,15 @@ Error Handling

    Error Handling

    -

    Code Igniter lets you build error reporting into your applications using the functions described below. +

    Code Igniter lets you build error reporting into your applications using the functions described below. In addition, it has an error logging class that permits error and debugging messages to be saved as text files.

    -

    Note: By default, Code Igniter displays all PHP errors. You might +

    Note: By default, Code Igniter displays all PHP errors. You might wish to change this behavior once your development is complete. You'll find the error_reporting() function located at the top of your main index.php file. Disabling error reporting will NOT prevent log files from being written if there are errors.

    -

    Unlike most systems in Code Igniter, the error functions are simple procedural interfaces that are available +

    Unlike most systems in Code Igniter, the error functions are simple procedural interfaces that are available globally throughout the application. This approach permits error messages to get triggered without having to worry about class/function scoping.

    @@ -90,7 +90,7 @@ Note that Code Igniter automatically shows 404 messages if controllers are not f

    log_message('level', 'message')

    -

    This function lets you write messages to your log files. You must supply one of three "levels" +

    This function lets you write messages to your log files. You must supply one of three "levels" in the first parameter, indicating what type of message it is (debug, error, info), with the message itself in the second parameter. Example:

    @@ -116,8 +116,8 @@ log_message('info', 'The purpose of some variable is to provide some value.'); -

    Note: In order for the log file to actually be written, the - "logs" folder must be writable. In addition, you must set the "threshold" for logging. +

    Note: In order for the log file to actually be written, the + "logs" folder must be writable. In addition, you must set the "threshold" for logging. You might, for example, only want error messages to be logged, and not the other two types. If you set it to zero logging will be disabled.

    diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html index 089d6d08e..e9283e9a7 100644 --- a/user_guide/general/helpers.html +++ b/user_guide/general/helpers.html @@ -12,7 +12,7 @@ @@ -71,12 +71,12 @@ that help you create form elements, Text Helpers perform various text

    Unlike most other systems in Code Igniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions. Each helper function performs one specific task, with no dependence on other functions.

    -

    Code Igniter does not load Helper Files by default, so the first step in using +

    Code Igniter does not load Helper Files by default, so the first step in using a Helper is to load it. Once loaded, it becomes globally available in your controller and views.

    Helpers are typically stored in your system/helpers directory. Alternately you can create a folder called helpers inside your application folder and store them there. Code Igniter will look first in your system/application/helpers -directory. If the directory does not exist or the specified helper is not located there CI will instead look in your global +directory. If the directory does not exist or the specified helper is not located there CI will instead look in your global system/helpers folder.

    diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html index 6bfa94ee9..341451aa7 100644 --- a/user_guide/general/hooks.html +++ b/user_guide/general/hooks.html @@ -12,7 +12,7 @@ @@ -62,10 +62,10 @@ Hooks - Extending the Framework Core

    Hooks - Extending the Framework Core

    -

    Code Igniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files. -When Code Igniter runs it follows a specific execution process, diagramed in the Application Flow page. -There may be instances, however, where you'd like to cause some action to take place at a particular stage in the execution process. -For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of +

    Code Igniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files. +When Code Igniter runs it follows a specific execution process, diagramed in the Application Flow page. +There may be instances, however, where you'd like to cause some action to take place at a particular stage in the execution process. +For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of your own scripts in some other location.

    @@ -83,14 +83,14 @@ your own scripts in some other location. $hook['pre_controller'] = array(
                                    'class'    => 'MyClass',
    -                                'function' => 'Myfunction',
    +                                'function' => 'Myfunction',
                                    'filename' => 'Myclass.php',
                                    'filepath' => 'hooks',
                                    'params'   => array('beer', 'wine', 'snacks')
                                    );
    -

    Notes:
    The array index correlates to the name of the particular hook point you want to -use. In the above example the hook point is pre_controller. A list of hook points is found below. +

    Notes:
    The array index correlates to the name of the particular hook point you want to +use. In the above example the hook point is pre_controller. A list of hook points is found below. The following items should be defined in your associative hook array:

      @@ -109,7 +109,7 @@ The following items should be defined in your associative hook array:

      $hook['pre_controller'][] = array(
                                      'class'    => 'MyClass',
      -                                'function' => 'Myfunction',
      +                                'function' => 'Myfunction',
                                      'filename' => 'Myclass.php',
                                      'filepath' => 'hooks',
                                      'params'   => array('beer', 'wine', 'snacks')
      @@ -117,7 +117,7 @@ $hook['pre_controller'][] = array(

      $hook['pre_controller'][] = array(
                                      'class'    => 'MyOtherClass',
      -                                'function' => 'MyOtherfunction',
      +                                'function' => 'MyOtherfunction',
                                      'filename' => 'Myotherclass.php',
                                      'filepath' => 'hooks',
                                      'params'   => array('red', 'yellow', 'blue')
      @@ -149,7 +149,7 @@ Called immediately after your controller is instantiated, but prior to any metho Called immediately after your controller is fully executed.
    • display_override
      -Overrides the _display() function, used to send the finalized page to the web browser at the end of system execution. This permits you to +Overrides the _display() function, used to send the finalized page to the web browser at the end of system execution. This permits you to use your own display methodology. Note that the finalized data will be available by calling $this->output->get_output()
    • cache_override
      diff --git a/user_guide/general/index.html b/user_guide/general/index.html index 9ca01f094..b2e89fafb 100644 --- a/user_guide/general/index.html +++ b/user_guide/general/index.html @@ -12,7 +12,7 @@ @@ -66,17 +66,17 @@ Getting Started curve while making the process as enjoyable as possible.

      -

      The first step is to install Code Igniter, then read +

      The first step is to install Code Igniter, then read all the topics in the Introduction section of the Table of Contents.

      Next, read each of the General Topics pages in order. Each topic builds on the previous one, and includes code examples that you are encouraged to try.

      -

      Once you understand the basics you'll be ready to explore the Class Reference and +

      Once you understand the basics you'll be ready to explore the Class Reference and Helper Reference pages to learn to utilize the native libraries and helper files.

      -

      Feel free to take advantage of our Community Forums -if you have questions or problems, and +

      Feel free to take advantage of our Community Forums +if you have questions or problems, and our Wiki to see code examples posted by other users.

      diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html index 5a191bb00..de34a7a09 100644 --- a/user_guide/general/libraries.html +++ b/user_guide/general/libraries.html @@ -12,7 +12,7 @@ @@ -63,7 +63,7 @@ Using Code Igniter Libraries

      Using Code Igniter Libraries

      -

      All of the available libraries are located in your system/libraries folder. +

      All of the available libraries are located in your system/libraries folder. In most cases, to use one of these classes involves initializing it within a controller using the following initialization function:

      $this->load->library('class name'); diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 3f1c1e224..18e575892 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -12,7 +12,7 @@ @@ -78,7 +78,7 @@ Models

      What is a Model?

      -

      Models are PHP classes that are designed to work with information in your database. For example, let's say +

      Models are PHP classes that are designed to work with information in your database. For example, let's say you use Code Igniter to manage a blog. You might have a model class that contains functions to insert, update, and retrieve your blog data. Here is an example of what such a model class might look like:

      @@ -127,7 +127,7 @@ class Blogmodel extends Model {

      Anatomy of a Model

      -

      Model classes are stored in your application/models/ folder. They can be nested within sub-folders if you +

      Model classes are stored in your application/models/ folder. They can be nested within sub-folders if you want this type of organization.

      The basic prototype for a model class is this:

      @@ -142,7 +142,7 @@ class Model_name extends Model {
          }
      }
      -

      Where Model_name is the name of your class. Class names must be capitalized. +

      Where Model_name is the name of your class. Class names must be capitalized. Make sure your class extends the base Model class.

      The file name will be a lower case version of your class name. For example, if your class is this:

      @@ -217,13 +217,13 @@ class Blog_controller extends Controller {
      • You can connect using the standard database methods described here, either from within your Controller class or your Model class.
      • You can tell the model loading function to auto-connect by passing TRUE (boolean) via the third parameter, -and connectivity settings, as defined in your database config file will be used: +and connectivity settings, as defined in your database config file will be used: $this->load->model('Model_name', '', TRUE);
      • -
      • You can manually pass database connectivity settings via the third parameter: +
      • You can manually pass database connectivity settings via the third parameter: $config['hostname'] = "localhost";
        diff --git a/user_guide/general/multiple_apps.html b/user_guide/general/multiple_apps.html index db4a0cff1..e7e45850e 100644 --- a/user_guide/general/multiple_apps.html +++ b/user_guide/general/multiple_apps.html @@ -12,7 +12,7 @@ diff --git a/user_guide/general/plugins.html b/user_guide/general/plugins.html index 78b82318d..85190af92 100644 --- a/user_guide/general/plugins.html +++ b/user_guide/general/plugins.html @@ -12,7 +12,7 @@ @@ -63,13 +63,13 @@ Plugins

        Plugins

        -

        Plugins work almost identically to Helpers. The main difference is that a plugin usually +

        Plugins work almost identically to Helpers. The main difference is that a plugin usually provides a single function, whereas a Helper is usually a collection of functions. Helpers are also considered a part of the core system; plugins are intended to be created and shared by our community.

        Plugins should be saved to your system/plugins directory or you can create a folder called plugins inside your application folder and store them there. Code Igniter will look first in your system/application/plugins -directory. If the directory does not exist or the specified plugin is not located there CI will instead look in your global +directory. If the directory does not exist or the specified plugin is not located there CI will instead look in your global system/plugins folder.

        @@ -102,7 +102,7 @@ automatically in any function, or you can load a plugin in a specific function t

        Auto-loading Plugins

        -

        If you find that you need a particular plugin globally throughout your application, you can tell Code Igniter to auto-load it +

        If you find that you need a particular plugin globally throughout your application, you can tell Code Igniter to auto-load it during system initialization. This is done by opening the application/config/autoload.php file and adding the plugin to the autoload array.

        diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index 880aa0c50..2a933e3fe 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -12,7 +12,7 @@ diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html index b9a293f38..20d3fec9f 100644 --- a/user_guide/general/quick_reference.html +++ b/user_guide/general/quick_reference.html @@ -12,7 +12,7 @@ diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html index bf5470c50..3efb3bba2 100644 --- a/user_guide/general/requirements.html +++ b/user_guide/general/requirements.html @@ -12,7 +12,7 @@ diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index 102f34db4..a0bb67138 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -12,7 +12,7 @@ @@ -62,12 +62,12 @@ URI Routing

        URI Routing

        -

        Typically there is a one-to-one relationship between a URL string and its corresponding controller class/method. +

        Typically there is a one-to-one relationship between a URL string and its corresponding controller class/method. The segments in a URI normally follow this pattern:

        www.your-site.com/class/function/id/ -

        In some instances, however, you may want to remap this relationship so that a different class/function can be called +

        In some instances, however, you may want to remap this relationship so that a different class/function can be called instead of the one corresponding to the URL.

        For example, lets say you want your URLs to have this prototype:

        @@ -79,7 +79,7 @@ www.your-site.com/product/3/
        www.your-site.com/product/4/

        -

        Normally the second segment of the URL is reserved for the function name, but in the example above it instead has a product ID. +

        Normally the second segment of the URL is reserved for the function name, but in the example above it instead has a product ID. To overcome this, Code Igniter allows you to remap the URI handler.

        @@ -95,8 +95,8 @@ permits you to specify your own routing criteria. Routes can either be specified $route['product/:num'] = "catalog/product_lookup"; -

        In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to. -In the above example, if the literal word "product" is found in the first segment of the URL, and a number is found in the second segment, +

        In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to. +In the above example, if the literal word "product" is found in the first segment of the URL, and a number is found in the second segment, the "catalog" class and the "product_lookup" method are instead used.

        You can match literal values or you can use two wildcard types:

        @@ -110,7 +110,7 @@ the "catalog" class and the "product_lookup" method are instead used.

        :any will match a segment containing any character.

        -

        Note: Routes will run in the order they are defined. +

        Note: Routes will run in the order they are defined. Higher routes will always take precedence over lower ones.

        diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html index b22b351ec..dbe9cb12e 100644 --- a/user_guide/general/scaffolding.html +++ b/user_guide/general/scaffolding.html @@ -12,7 +12,7 @@ @@ -62,11 +62,11 @@ Scaffolding

        Scaffolding

        -

        Code Igniter's Scaffolding feature provides a fast and very convenient way to add, edit, or delete information in your database +

        Code Igniter's Scaffolding feature provides a fast and very convenient way to add, edit, or delete information in your database during development.

        Very Important: Scaffolding is intended for development use only. It provides very little -security other than a "secret" word, so anyone who has access to your Code Igniter site can potentially edit or delete your information. +security other than a "secret" word, so anyone who has access to your Code Igniter site can potentially edit or delete your information. If you use scaffolding make sure you disable it immediately after you are through using it. DO NOT leave it enabled on a live site. And please, set a secret word before you use it.

        @@ -75,7 +75,7 @@ And please, set a secret word before you use it.

        Here's a typical scenario: You create a new database table during development and you'd like a quick way to insert some data into it to work with. Without scaffolding your choices are either to write some inserts using the command line or to use a -database management tool like phpMyAdmin. With Code Igniter's scaffolding feature you can quickly add some data using its browser +database management tool like phpMyAdmin. With Code Igniter's scaffolding feature you can quickly add some data using its browser interface. And when you are through using the data you can easily delete it.

        Setting a Secret Word

        @@ -95,7 +95,7 @@ will launch the scaffolding interface, so please pick something obscure that no

        Enabling Scaffolding

        Note: The information on this page assumes you already know how controllers work, and that you have -a working one available. It also assumes you have configured Code Igniter to auto-connect to your database. +a working one available. It also assumes you have configured Code Igniter to auto-connect to your database. If not, the information here won't be very relevant, so you are encouraged to go through those sections first. Lastly, it assumes you understand what a class constructor is. If not, read the last section of the controllers page.

        diff --git a/user_guide/general/security.html b/user_guide/general/security.html index c3218cdba..e8f935d5b 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -12,7 +12,7 @@ @@ -84,7 +84,7 @@ minimize the possibility that malicious data can be passed to your application.

        GET, POST, and COOKIE Data

        GET data is simply disallowed by Code Igniter since the system utilizes URI segments rather than traditional URL query strings (unless -you have the query string option enabled in your config file). The global GET +you have the query string option enabled in your config file). The global GET array is unset by the Input class during system initialization.

        Register_globals

        @@ -100,7 +100,7 @@ retrieving data from your database.

        Best Practices

        -

        Before accepting any data into your application, whether it be POST data from a form submission, COOKIE data, URI data, +

        Before accepting any data into your application, whether it be POST data from a form submission, COOKIE data, URI data, XML-RPC data, or even data from the SERVER array, you are encouraged to practice this three step approach:

          @@ -116,15 +116,15 @@ Code Igniter provides the following functions to assist in this process:

        1. XSS Filtering

          -

          Code Igniter comes with a Cross Site Scripting filter. This filter looks for commonly +

          Code Igniter comes with a Cross Site Scripting filter. This filter looks for commonly used techniques to embed malicious Javascript into your data, or other types of code that attempt to hijack cookies -or do other malicious things. The XSS Filter is described here. +or do other malicious things. The XSS Filter is described here.

        2. Validate the data

          -

          Code Igniter has a Validation Class that assists you in validating, filtering, and prepping +

          Code Igniter has a Validation Class that assists you in validating, filtering, and prepping your data.

        3. diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index b3b842d46..c90e90f7d 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -12,7 +12,7 @@ @@ -63,7 +63,7 @@ URLS

          Code Igniter URLs

          -

          By default, URLs in Code Igniter are designed to be search-engine and human friendly. Rather than using the standard "query string" +

          By default, URLs in Code Igniter are designed to be search-engine and human friendly. Rather than using the standard "query string" approach to URLs that is synonymous with dynamic systems, Code Igniter uses a segment-based approach:

          www.your-site.com/news/article/my_article @@ -82,8 +82,8 @@ approach to URLs that is synonymous with dynamic systems, Code Igniter uses a The third, and any additional segments, represent the ID and any variables that will be passed to the controller.

        -

        The URI Class and the URL Helper -contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the +

        The URI Class and the URL Helper +contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the URI Routing feature for more flexibility.

        @@ -136,7 +136,7 @@ be accessible using the "trigger" words you've set to invoke your controllers an index.php?c=controller&m=method

        Please note: If you are using query strings you will have to build your own URLs, rather than utilizing -the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with +the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with segment based URLs.

        diff --git a/user_guide/general/views.html b/user_guide/general/views.html index d4ccb5148..602d58255 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -12,7 +12,7 @@ @@ -63,11 +63,11 @@ Views

        Views

        A view is simply a web page, or a page fragment, like a header, footer, sidebar, etc. -In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type +In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type of hierarchy.

        Views are never called directly, they must be loaded by a controller. Remember that in an MVC framework, the Controller acts as the -traffic cop, so it is responsible for fetching a particular view. If you have not read the Controllers page +traffic cop, so it is responsible for fetching a particular view. If you have not read the Controllers page you should do so before continuing.

        Using the example controller you created in the controller page, let's add a view to it.

        @@ -120,7 +120,7 @@ class Blog extends Controller {

        Adding Dynamic Data to the View

        -

        Data is passed from the controller to the view by way of an array or an object in the second +

        Data is passed from the controller to the view by way of an array or an object in the second parameter of the view loading function. Here is an example using an array:

        $data = array(
        -- cgit v1.2.3-24-g4f1b