diff options
author | admin <devnull@localhost> | 2006-10-07 05:16:32 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-07 05:16:32 +0200 |
commit | 88a8ad187b13b36d6120eae2344fe16c3a76219d (patch) | |
tree | 9707b986ae9fe37f226abd5fec76b58d15903858 /user_guide/general/creating_libraries.html | |
parent | 81ccb439c2743776728b798bdc7e31db3d826233 (diff) |
Diffstat (limited to 'user_guide/general/creating_libraries.html')
-rw-r--r-- | user_guide/general/creating_libraries.html | 12 |
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>
|