From dd6719738936be31cdaa1758ca86d5eb14dcab3d Mon Sep 17 00:00:00 2001 From: Barry Mieny Date: Mon, 4 Oct 2010 16:33:58 +0200 Subject: Cleanup of stray spaces and tabs --- system/libraries/Driver.php | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'system/libraries/Driver.php') diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index 07ef2e724..1261b4c72 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -25,25 +25,25 @@ * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link + * @link */ class CI_Driver_Library { protected $valid_drivers = array(); protected static $lib_name; - + // The first time a child is used it won't exist, so we instantiate it // subsequents calls will go straight to the proper child. function __get($child) { if (! isset($this->lib_name)) { - $this->lib_name = get_class($this); + $this->lib_name = get_class($this); } // The class will be prefixed with the parent lib $child_class = $this->lib_name.'_'.$child; - + if (in_array(strtolower($child_class), array_map('strtolower', $this->valid_drivers))) { // check and see if the driver is in a separate file @@ -64,11 +64,11 @@ class CI_Driver_Library { { include_once $filepath; break; - } + } } } } - + // it's a valid driver, but the file simply can't be found if ( ! class_exists($child_class)) { @@ -82,14 +82,14 @@ class CI_Driver_Library { $this->$child = $obj; return $this->$child; } - + // The requested driver isn't valid! log_message('error', "Invalid driver requested: ".$child_class); show_error("Invalid driver requested: ".$child_class); } - + // -------------------------------------------------------------------- - + } // END CI_Driver_Library CLASS @@ -104,11 +104,11 @@ class CI_Driver_Library { * @subpackage Libraries * @category Libraries * @author EllisLab Dev Team - * @link + * @link */ class CI_Driver { protected $parent; - + private $methods = array(); private $properties = array(); @@ -126,16 +126,16 @@ class CI_Driver { function decorate($parent) { $this->parent = $parent; - + // Lock down attributes to what is defined in the class // and speed up references in magic methods - + $class_name = get_class($parent); - + if ( ! isset(self::$reflections[$class_name])) { $r = new ReflectionObject($parent); - + foreach ($r->getMethods() as $method) { if ($method->isPublic()) @@ -151,7 +151,7 @@ class CI_Driver { $this->properties[] = $prop->getName(); } } - + self::$reflections[$class_name] = array($this->methods, $this->properties); } else @@ -159,9 +159,9 @@ class CI_Driver { list($this->methods, $this->properties) = self::$reflections[$class_name]; } } - + // -------------------------------------------------------------------- - + /** * __call magic method * @@ -185,7 +185,7 @@ class CI_Driver { } // -------------------------------------------------------------------- - + /** * __get magic method * @@ -204,7 +204,7 @@ class CI_Driver { } // -------------------------------------------------------------------- - + /** * __set magic method * @@ -222,9 +222,9 @@ class CI_Driver { $this->parent->$var = $val; } } - + // -------------------------------------------------------------------- - + } // END CI_Driver CLASS -- cgit v1.2.3-24-g4f1b