Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
8 / 8 |
Implementation | |
100.00% |
1 / 1 |
|
100.00% |
6 / 6 |
7 | |
100.00% |
8 / 8 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
|||
__call | |
100.00% |
1 / 1 |
2 | |
100.00% |
3 / 3 |
|||
connection | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
type | |
100.00% |
1 / 1 |
1 | ||||||
execute | |
100.00% |
1 / 1 |
1 | ||||||
parse | |
100.00% |
1 / 1 |
1 |
<?php | |
namespace PHPixie\Database\Query; | |
abstract class Implementation implements \PHPixie\Database\Query | |
{ | |
protected $database; | |
protected $conditions; | |
protected $connection; | |
protected $parser; | |
protected $config; | |
protected $aliases = array(); | |
public function __construct($connection, $parser, $builder) | |
{ | |
$this->connection = $connection; | |
$this->parser = $parser; | |
$this->builder = $builder; | |
} | |
public function __call($method, $args) | |
{ | |
if(!array_key_exists($method, $this->aliases)) | |
throw new \PHPixie\Database\Exception\Builder("Method $method does not exist."); | |
return call_user_func_array(array($this, $this->aliases[$method]), $args); | |
} | |
public function connection() | |
{ | |
return $this->connection; | |
} | |
abstract public function type(); | |
abstract public function execute(); | |
abstract public function parse(); | |
} |