From ce66d155eca7d447bdcc6feb47c17647ac754c35 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 4 Mar 2008 20:55:55 +0000 Subject: validation error fixes --- user_guide/general/creating_libraries.html | 10 ++++++---- user_guide/general/hooks.html | 2 +- user_guide/general/profiling.html | 14 ++------------ user_guide/general/security.html | 3 +-- user_guide/general/urls.html | 6 +++--- 5 files changed, 13 insertions(+), 22 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index 6a4773be4..d32dda9d0 100644 --- a/user_guide/general/creating_libraries.html +++ b/user_guide/general/creating_libraries.html @@ -179,12 +179,13 @@ If you would like to use CodeIgniter's classes from within your own custom class

First, assign the CodeIgniter object to a variable:

-$CI =& get_instance(); +$CI =& get_instance();

Once you've assigned the object to a variable, you'll use that variable instead of $this:

-$CI =& get_instance();

+$CI =& get_instance();
+
$CI->load->helper('url');
$CI->load->library('session');
$CI->config->item('base_url');
@@ -193,8 +194,9 @@ etc.

Note: You'll notice that the above get_instance() function is being passed by reference:

-$CI =& get_instance(); -

+$CI =& get_instance(); +
+
This is very important. Assigning by reference allows you to use the original CodeIgniter object rather than creating a copy of it.

Also, please note: If you are running PHP 4 it's usually best to avoid calling get_instance() diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html index e24c48ada..14e28d47f 100644 --- a/user_guide/general/hooks.html +++ b/user_guide/general/hooks.html @@ -127,7 +127,7 @@ $hook['pre_controller'][] = array(

Hook Points

-The following is a list of available hook points.

+

The following is a list of available hook points.