summaryrefslogtreecommitdiffstats
path: root/user_guide/general/creating_libraries.html
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide/general/creating_libraries.html')
-rw-r--r--user_guide/general/creating_libraries.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html
index e2a57f02a..b73bfb888 100644
--- a/user_guide/general/creating_libraries.html
+++ b/user_guide/general/creating_libraries.html
@@ -184,21 +184,21 @@ If you would like to use Code Igniter's classes from within your own custom clas
<p>First, assign the Code Igniter object to a variable:</p>
-<code>$obj =& get_instance();</code>
+<code>$CI =& get_instance();</code>
<p>Once you've assigned the object to a variable, you'll use that variable <em>instead</em> of <kbd>$this</kbd>:</p>
<code>
-$obj =& get_instance();<br /><br />
-$obj->load->helper('url');<br />
-$obj->load->library('session');<br />
-$obj->config->item('base_url');<br />
+$CI =& get_instance();<br /><br />
+$CI->load->helper('url');<br />
+$CI->load->library('session');<br />
+$CI->config->item('base_url');<br />
etc.
</code>
<p class="important"><strong>Note:</strong> You'll notice that the above get_instance() function is being passed by reference:
<br /><br />
-<var>$obj =& get_instance();</var>
+<var>$CI =& get_instance();</var>
<br /><br />
<kbd>This is very important.</kbd> Assigning by reference allows you to use the original Code Igniter object rather than creating a copy of it.</p>