/** * __call magic method * * Handles access to the parent driver library's methods * * @param string Library method name * @param array Method arguments (default: none) * @return mixed */ public function __call($method, $args = array()) { // Make sure the parent library uses this driver $this->_parent->select_driver(get_class($this)); return parent::__call($method, $args); }
/** * Decorate * * Decorates the child with the parent driver lib's methods and properties * * @param object Parent library object * @return void */ public function decorate($parent) { // Call base class decorate first parent::decorate($parent); // Call initialize method now that driver has access to $this->_parent $this->initialize(); }