__get() 공개 메소드

The first time a child is used it won't exist, so we instantiate it subsequents calls will go straight to the proper child.
public __get ( $child ) : object
리턴 object Child class
예제 #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);
 }