This class enables you to create "Driver" libraries that add runtime ability to extend the capabilities of a class via additional driver objects
저자: EllisLab Dev Team
예제 #1
0
파일: Cache.php 프로젝트: adamus1red/SWI
 public function __get($child)
 {
     $obj = parent::__get($child);
     if (!$this->is_supported($child)) {
         $this->_adapter = $this->_backup_driver;
     }
     return $obj;
 }
예제 #2
0
 /**
  * Check for drivers in our subfolder
  */
 public function __get($child)
 {
     $driver_file = MERCHANT_DRIVER_PATH . '/merchant_' . strtolower($child) . '.php';
     if (file_exists($driver_file)) {
         include_once $driver_file;
     }
     return parent::__get($child);
 }
 /**
  * Loads session storage driver
  *
  * @param	string	Driver classname
  * @return	object	Loaded driver object
  */
 public function load_driver($driver)
 {
     // Save reference to most recently loaded driver as library default and sync userdata
     $this->current = parent::load_driver($driver);
     $this->userdata =& $this->current->get_userdata();
     return $this->current;
 }