__get() public method

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
return object Child class
Esempio n. 1
0
 public function __get($child)
 {
     $obj = parent::__get($child);
     if (!$this->is_supported($child)) {
         $this->_adapter = $this->_backup_driver;
     }
     return $obj;
 }
Esempio n. 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);
 }