summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2010-12-27 20:06:28 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2010-12-27 20:06:28 +0100
commitc8089154217307a56b60ae8f0cb85087a1531b27 (patch)
tree18ea049c55438a80d9b3465863ff699063a12304 /system/core/Loader.php
parent2280e8ea67f94e67f2c803e804fb1b8125b579b0 (diff)
parent5cbe4dd1f0d94791fe86e08111b77c1d57b83f54 (diff)
Implemented GET string support from Dan Horrigan and modified it slightly. Also tweaked his regex_match changes.
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php26
1 files changed, 21 insertions, 5 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 4b6b19eea..136cae9bf 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -81,12 +81,12 @@ class CI_Loader {
{
foreach($library as $read)
{
- $this->library($read);
+ $this->library($read);
}
-
+
return;
}
-
+
if ($library == '' OR isset($this->_base_classes[$library]))
{
return FALSE;
@@ -527,7 +527,7 @@ class CI_Loader {
function add_package_path($path)
{
$path = rtrim($path, '/').'/';
-
+
array_unshift($this->_ci_library_paths, $path);
array_unshift($this->_ci_model_paths, $path);
array_unshift($this->_ci_helper_paths, $path);
@@ -540,6 +540,22 @@ class CI_Loader {
// --------------------------------------------------------------------
/**
+ * Get Package Paths
+ *
+ * Return a list of all package paths, by default it will ignore BASEPATH.
+ *
+ * @access public
+ * @param string
+ * @return void
+ */
+ function get_package_paths($include_base = FALSE)
+ {
+ return $include_base === TRUE ? $this->_ci_library_paths : $this->_ci_model_paths;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Remove Package Path
*
* Remove a path from the library, model, and helper path arrays if it exists
@@ -563,7 +579,7 @@ class CI_Loader {
else
{
$path = rtrim($path, '/').'/';
-
+
foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var)
{
if (($key = array_search($path, $this->{$var})) !== FALSE)