From d2df9bc7cc9d4b3e53818470c5d0977c9a36677c Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Sun, 15 Apr 2007 17:41:17 +0000 Subject: update pMachine to EllisLab update copyright year update Code Igniter to CodeIgniter --- user_guide/general/creating_libraries.html | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'user_guide/general/creating_libraries.html') diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index d8fdb3892..f17c3cf6d 100644 --- a/user_guide/general/creating_libraries.html +++ b/user_guide/general/creating_libraries.html @@ -2,7 +2,7 @@ -Code Igniter User Guide +CodeIgniter User Guide @@ -22,7 +22,7 @@ window.onload = function() { - + @@ -33,7 +33,7 @@ window.onload = function() {
- +

Code Igniter User Guide Version 1.5.2

CodeIgniter User Guide Version 1.5.3

@@ -45,7 +45,7 @@ window.onload = function() { @@ -67,7 +67,7 @@ directory and described in the Class Reference of this user guide. In this case 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, CodeIgniter 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 CodeIgniter will look for them when they are initialized.

@@ -121,7 +121,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. -Code Igniter doesn't care.

+CodeIgniter doesn't care.

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

@@ -163,13 +163,13 @@ the config file option will not be available.

-

Utilizing Code Igniter Resources within Your Library

+

Utilizing CodeIgniter Resources within Your Library

-

To access Code Igniter's native resources within your library use the get_instance() function. -This function returns the Code Igniter super object.

+

To access CodeIgniter's native resources within your library use the get_instance() function. +This function returns the CodeIgniter super object.

-

Normally from within your controller functions you will call any of the available Code Igniter functions using the $this construct:

+

Normally from within your controller functions you will call any of the available CodeIgniter functions using the $this construct:

$this->load->helper('url');
@@ -179,10 +179,10 @@ etc.

$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:

+If you would like to use CodeIgniter's classes from within your own custom classes you can do so as follows:

-

First, assign the Code Igniter object to a variable:

+

First, assign the CodeIgniter object to a variable:

$CI =& get_instance(); @@ -200,12 +200,12 @@ etc.

$CI =& get_instance();

-This is very important. Assigning by reference allows you to use the original Code Igniter object rather than creating a copy of it.

+This is very important. Assigning by reference allows you to use the original CodeIgniter object rather than creating a copy of it.

Replacing Native Libraries with Your Versions

-

Simply by naming your class files identically to a native library will cause Code Igniter to use it instead of the native one. To use this +

Simply by naming your class files identically to a native library will cause CodeIgniter to use it instead of the native one. To use this feature you must name the file and the class declaration exactly the same as the native library. For example, to replace the native Email library you'll create a file named application/libraries/Email.php, and declare your class with:

@@ -274,7 +274,7 @@ the email class all calls will use: $config['subclass_prefix'] = 'MY_'; -

Please note that all native Code Igniter libraries are prefixed with CI_ so DO NOT use that as your prefix.

+

Please note that all native CodeIgniter libraries are prefixed with CI_ so DO NOT use that as your prefix.

@@ -284,13 +284,13 @@ the email class all calls will use: -- cgit v1.2.3-24-g4f1b