1: <?php
2:
3: namespace PHPixie\Database\Query;
4:
5: abstract class Implementation implements \PHPixie\Database\Query
6: {
7: protected $database;
8: protected $conditions;
9: protected $connection;
10: protected $parser;
11: protected $config;
12: protected $aliases = array();
13:
14: public function __construct($connection, $parser, $builder)
15: {
16: $this->connection = $connection;
17: $this->parser = $parser;
18: $this->builder = $builder;
19: }
20:
21: public function __call($method, $args)
22: {
23: if(!array_key_exists($method, $this->aliases))
24: throw new \PHPixie\Database\Exception\Builder("Method $method does not exist.");
25:
26: return call_user_func_array(array($this, $this->aliases[$method]), $args);
27: }
28:
29: public function connection()
30: {
31: return $this->connection;
32: }
33:
34: abstract public function type();
35: abstract public function execute();
36: abstract public function parse();
37:
38: }
39: