summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-04-01 12:40:09 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-04-01 12:40:09 +0200
commita36f637f8c632fc0bb3c0baeea167c48167a1868 (patch)
treebc8a992c582f62ef063274a47e909f00d5335874
parenta955803ba49ca0b58c3634f800962ca49068ea81 (diff)
parent3c6e4851451cd62b02980821cccdd93290463795 (diff)
Merged changes.
-rw-r--r--system/core/Loader.php16
-rw-r--r--user_guide/libraries/input.html6
-rw-r--r--user_guide/libraries/loader.html7
3 files changed, 13 insertions, 16 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 75c09435d..5c7a7eff8 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -81,7 +81,7 @@ class CI_Loader {
{
foreach ($library as $read)
{
- $this->library($read);
+ $this->library($class, $params);
}
return;
@@ -97,17 +97,7 @@ class CI_Loader {
$params = NULL;
}
- if (is_array($library))
- {
- foreach ($library as $class)
- {
- $this->_ci_load_class($class, $params, $object_name);
- }
- }
- else
- {
- $this->_ci_load_class($library, $params, $object_name);
- }
+ $this->_ci_load_class($library, $params, $object_name);
}
// --------------------------------------------------------------------
@@ -1111,4 +1101,4 @@ class CI_Loader {
}
/* End of file Loader.php */
-/* Location: ./system/core/Loader.php */ \ No newline at end of file
+/* Location: ./system/core/Loader.php */
diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html
index 479e71bf7..d7e898bd1 100644
--- a/user_guide/libraries/input.html
+++ b/user_guide/libraries/input.html
@@ -217,17 +217,17 @@ zero the cookie will only last as long as the browser is open.</p>
<code>$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);</code>
-<h2>$this->input->get_cookie()</h2>
+<h2>$this->input->cookie()</h2>
<p>Lets you fetch a cookie. The first parameter will contain the name of the cookie you are looking for (including any prefixes):</p>
-<code>get_cookie('some_cookie');</code>
+<code>cookie('some_cookie');</code>
<p>The function returns FALSE (boolean) if the item you are attempting to retrieve does not exist.</p>
<p>The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE;</p>
-<p><code>get_cookie('some_cookie', TRUE);</code></p>
+<p><code>cookie('some_cookie', TRUE);</code></p>
<h2>$this->input->ip_address()</h2>
diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html
index 7da087a43..62a250482 100644
--- a/user_guide/libraries/loader.html
+++ b/user_guide/libraries/loader.html
@@ -90,6 +90,10 @@ For example, if you have file located at:</p>
<p>You may nest the file in as many subdirectories as you want.</p>
+<p>Additionally, multiple libraries can be loaded at the same time by passing an array of libraries to the load function.</p>
+
+<code>$this->load->library(array('<var>email</var>', '<var>table</var>'));</code>
+
<h3>Setting options</h3>
<p>The second (optional) parameter allows you to optionally pass configuration setting. You will typically pass these as an array:</p>
@@ -105,6 +109,8 @@ $this->load->library('email', $config);</code>
<p>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.</p>
+<p>Please take note, when multiple libraries are supplied in an array for the first parameter, each will receive the same parameter information.</p>
+
<h3>Assigning a Library to a different object name</h3>
<p>If the third (optional) 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 <dfn>Session</dfn>, it
@@ -120,6 +126,7 @@ $this->my_session
</code>
+<p>Please take note, when multiple libraries are supplied in an array for the first parameter, this parameter is discarded.</p>
<h2>$this->load->view('<var>file_name</var>', <samp>$data</samp>, <kbd>true/false</kbd>)</h2>