Add __call to query builder
This commit is contained in:
parent
5e73938733
commit
7275eb10fa
@ -917,6 +917,28 @@ class Query_Builder {
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Calls a function further down the inheritence chain
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
*/
|
||||
public function __call($name, $params)
|
||||
{
|
||||
if ( ! empty($this->db->$name))
|
||||
{
|
||||
if (is_callable($this->db->$name))
|
||||
{
|
||||
return call_user_func_array(array($this->db, $name), $params);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
@ -142,6 +142,8 @@ class FirebirdQBTest extends UnitTestCase {
|
||||
->get();
|
||||
|
||||
$this->assertTrue(is_resource($query));
|
||||
|
||||
<pre><?= print_r($this->db->fetchAll(), TRUE) ?></pre>
|
||||
}
|
||||
|
||||
/*function TestGroupBy()
|
||||
|
Loading…
Reference in New Issue
Block a user