From a6543fa8f14ed8041b794f8df3934a007fdf075a Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Thu, 21 Aug 2008 18:58:41 +0000 Subject: --- user_guide/libraries/loader.html | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'user_guide') diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index 71f77650c..05b7024d1 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -90,7 +90,35 @@ For example, if you have file located at:

You may nest the file in as many subdirectories as you want.

-

Each library is described in detail in its own page, so please read the information regarding each one you would like to use.

+

Setting options

+ +

The second parameter allows you to optionally pass configuration setting. You will typically pass these as an array:

+ + +$config = array (
+                  'mailtype' => 'html',
+                  'charset'  => 'utf-8,
+                  'priority' => '1'
+               );
+
+$this->load->library('email', $config);
+ +

Config options can usually also be set via a config file. Each library is explained in detail in its own page, so please read the information regarding each one you would like to use.

+ +

Assigning a Library to a different object name

+ +

If the third parameter is blank, the library will usually be assigned to an object with the same name as the library. For example, if the library is named Session, it +will be assigned to a variable named $this->session.

+ +

If you prefer to set your own class names you can pass its value to the third parameter:

+ +$this->load->library('session', '', 'my_session');

+ +// Session class is now accessed using:

+ +$this->my_session + +
-- cgit v1.2.3-24-g4f1b