ci_db_driver = new $driver_class($config); } } /** * Overloading method, emulate the actual driver method (multiple inheritance workaround) */ public function __call($method, $arguments) { if ( ! is_callable(array($this->ci_db_driver, $method))) { throw new BadMethodCallException($method. ' not exists or not implemented'); } return call_user_func_array(array($this->ci_db_driver, $method), $arguments); } } class CI_DB extends CI_DB_query_builder {}