| @@ 1104-1117 (lines=14) @@ | ||
| 1101 | * |
|
| 1102 | * @see where() |
|
| 1103 | */ |
|
| 1104 | public function andWhere() |
|
| 1105 | { |
|
| 1106 | $args = func_get_args(); |
|
| 1107 | $where = $this->getDQLPart('where'); |
|
| 1108 | ||
| 1109 | if ($where instanceof Expr\Andx) { |
|
| 1110 | $where->addMultiple($args); |
|
| 1111 | } else { |
|
| 1112 | array_unshift($args, $where); |
|
| 1113 | $where = new Expr\Andx($args); |
|
| 1114 | } |
|
| 1115 | ||
| 1116 | return $this->add('where', $where); |
|
| 1117 | } |
|
| 1118 | ||
| 1119 | /** |
|
| 1120 | * Adds one or more restrictions to the query results, forming a logical |
|
| @@ 1137-1150 (lines=14) @@ | ||
| 1134 | * |
|
| 1135 | * @see where() |
|
| 1136 | */ |
|
| 1137 | public function orWhere() |
|
| 1138 | { |
|
| 1139 | $args = func_get_args(); |
|
| 1140 | $where = $this->getDQLPart('where'); |
|
| 1141 | ||
| 1142 | if ($where instanceof Expr\Orx) { |
|
| 1143 | $where->addMultiple($args); |
|
| 1144 | } else { |
|
| 1145 | array_unshift($args, $where); |
|
| 1146 | $where = new Expr\Orx($args); |
|
| 1147 | } |
|
| 1148 | ||
| 1149 | return $this->add('where', $where); |
|
| 1150 | } |
|
| 1151 | ||
| 1152 | /** |
|
| 1153 | * Specifies a grouping over the results of the query. |
|
| @@ 1217-1230 (lines=14) @@ | ||
| 1214 | * |
|
| 1215 | * @return self |
|
| 1216 | */ |
|
| 1217 | public function andHaving($having) |
|
| 1218 | { |
|
| 1219 | $args = func_get_args(); |
|
| 1220 | $having = $this->getDQLPart('having'); |
|
| 1221 | ||
| 1222 | if ($having instanceof Expr\Andx) { |
|
| 1223 | $having->addMultiple($args); |
|
| 1224 | } else { |
|
| 1225 | array_unshift($args, $having); |
|
| 1226 | $having = new Expr\Andx($args); |
|
| 1227 | } |
|
| 1228 | ||
| 1229 | return $this->add('having', $having); |
|
| 1230 | } |
|
| 1231 | ||
| 1232 | /** |
|
| 1233 | * Adds a restriction over the groups of the query, forming a logical |
|
| @@ 1240-1253 (lines=14) @@ | ||
| 1237 | * |
|
| 1238 | * @return self |
|
| 1239 | */ |
|
| 1240 | public function orHaving($having) |
|
| 1241 | { |
|
| 1242 | $args = func_get_args(); |
|
| 1243 | $having = $this->getDQLPart('having'); |
|
| 1244 | ||
| 1245 | if ($having instanceof Expr\Orx) { |
|
| 1246 | $having->addMultiple($args); |
|
| 1247 | } else { |
|
| 1248 | array_unshift($args, $having); |
|
| 1249 | $having = new Expr\Orx($args); |
|
| 1250 | } |
|
| 1251 | ||
| 1252 | return $this->add('having', $having); |
|
| 1253 | } |
|
| 1254 | ||
| 1255 | /** |
|
| 1256 | * Specifies an ordering for the query results. |
|