From 2067d1a727e7eb5e5ffb40e967f3d1fc4c8a41b2 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 13 Nov 2008 22:59:24 +0000 Subject: Changing EOL style to LF --- user_guide/general/plugins.html | 252 ++++++++++++++++++++-------------------- 1 file changed, 126 insertions(+), 126 deletions(-) (limited to 'user_guide/general/plugins.html') diff --git a/user_guide/general/plugins.html b/user_guide/general/plugins.html index 8471840a7..d902ad052 100644 --- a/user_guide/general/plugins.html +++ b/user_guide/general/plugins.html @@ -1,127 +1,127 @@ - - - - - -Plugins : CodeIgniter User Guide - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

CodeIgniter User Guide Version 1.7

-
- - - - - - - - - -
- - -
- - - -
- - -

Plugins

- -

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. CodeIgniter 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 -system/plugins folder.

- - -

Loading a Plugin

- -

Loading a plugin file is quite simple using the following function:

- -$this->load->plugin('name'); - -

Where name is the file name of the plugin, without the .php file extension or the "plugin" part.

- -

For example, to load the Captcha plugin, which is named captcha_pi.php, you will do this:

- -$this->load->plugin('captcha'); - - - -

A plugin can be loaded anywhere within your controller functions (or even within your View files, although that's not a good practice), -as long as you load it before you use it. You can load your plugins in your controller constructor so that they become available -automatically in any function, or you can load a plugin in a specific function that needs it.

- -

Note: The Plugin loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.

- - -

Loading Multiple Plugins

- -

If you need to load more than one plugin you can specify them in an array, like this:

- -$this->load->plugin( array('plugin1', 'plugin2', 'plugin3') ); - -

Auto-loading Plugins

- -

If you find that you need a particular plugin globally throughout your application, you can tell CodeIgniter 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.

- - -

Using a Plugin

- -

Once you've loaded the Plugin, you'll call it the way you would a standard PHP function.

- - - - -
- - - - - - + + + + + +Plugins : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

CodeIgniter User Guide Version 1.7

+
+ + + + + + + + + +
+ + +
+ + + +
+ + +

Plugins

+ +

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. CodeIgniter 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 +system/plugins folder.

+ + +

Loading a Plugin

+ +

Loading a plugin file is quite simple using the following function:

+ +$this->load->plugin('name'); + +

Where name is the file name of the plugin, without the .php file extension or the "plugin" part.

+ +

For example, to load the Captcha plugin, which is named captcha_pi.php, you will do this:

+ +$this->load->plugin('captcha'); + + + +

A plugin can be loaded anywhere within your controller functions (or even within your View files, although that's not a good practice), +as long as you load it before you use it. You can load your plugins in your controller constructor so that they become available +automatically in any function, or you can load a plugin in a specific function that needs it.

+ +

Note: The Plugin loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.

+ + +

Loading Multiple Plugins

+ +

If you need to load more than one plugin you can specify them in an array, like this:

+ +$this->load->plugin( array('plugin1', 'plugin2', 'plugin3') ); + +

Auto-loading Plugins

+ +

If you find that you need a particular plugin globally throughout your application, you can tell CodeIgniter 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.

+ + +

Using a Plugin

+ +

Once you've loaded the Plugin, you'll call it the way you would a standard PHP function.

+ + + + +
+ + + + + + \ No newline at end of file -- cgit v1.2.3-24-g4f1b