Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
39 | protected function buildOrder($query) { |
||
40 | if(!count($this->orderBy)) { |
||
41 | return $query; |
||
42 | } |
||
43 | $query .= "ORDER BY\n"; |
||
44 | $arr = array(); |
||
45 | foreach($this->orderBy as $order) { |
||
46 | list($expression, $direction) = $order; |
||
47 | $arr[] = sprintf("\t%s %s", $expression, strtoupper($direction)); |
||
48 | } |
||
49 | return $query.join(",\n", $arr)."\n"; |
||
50 | } |
||
51 | } |
||
52 |