1 | <?php |
||
19 | class QueryClauseExpression implements ExpressionInterface |
||
20 | { |
||
21 | const CLAUSE_WHERE = 'WHERE'; |
||
22 | const CLAUSE_SELECT = 'SELECT'; |
||
23 | const CLAUSE_ORDER_BY = 'ORDER BY'; |
||
24 | const CLAUSE_SET = 'SET'; |
||
25 | const CLAUSE_GROUP_BY = 'GROUP BY'; |
||
26 | const CLAUSE_HAVING = 'HAVING'; |
||
27 | |||
28 | /** |
||
29 | * @var string $clause |
||
30 | */ |
||
31 | private $clause; |
||
32 | |||
33 | /** |
||
34 | * @var ExpressionInterface $wrappedExpression |
||
35 | */ |
||
36 | private $wrappedExpression; |
||
37 | |||
38 | /** |
||
39 | * @var bool $quietWhenEmpty |
||
40 | */ |
||
41 | private $quietWhenEmpty; |
||
42 | |||
43 | /** |
||
44 | * @param string $clause |
||
45 | * @param ExpressionInterface $expression |
||
46 | * @param bool $quietWhenEmpty |
||
47 | */ |
||
48 | 24 | public function __construct($clause, ExpressionInterface $expression, $quietWhenEmpty = true) |
|
54 | |||
55 | /** |
||
56 | * @return boolean |
||
57 | */ |
||
58 | 24 | public function isQuietWhenEmpty() |
|
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | */ |
||
66 | 24 | public function isEmpty() |
|
84 | |||
85 | /** |
||
86 | * @return string |
||
87 | */ |
||
88 | 21 | public function getClause() |
|
92 | |||
93 | /** |
||
94 | * @return ExpressionInterface |
||
95 | */ |
||
96 | 21 | public function getWrappedExpression() |
|
100 | |||
101 | /** |
||
102 | * @inheritdoc |
||
103 | */ |
||
104 | 24 | public function compile() |
|
114 | } |