1 | <?php |
||
6 | class SelectBuilder extends AbstractBuilder |
||
7 | { |
||
8 | /** |
||
9 | * |
||
10 | * Builds the columns clause. |
||
11 | * |
||
12 | * @return string |
||
13 | * |
||
14 | * @throws Exception when there are no columns in the SELECT. |
||
15 | * |
||
16 | */ |
||
17 | 189 | public function buildCols($cols) |
|
34 | |||
35 | /** |
||
36 | * |
||
37 | * Builds the FROM clause. |
||
38 | * |
||
39 | * @return string |
||
40 | * |
||
41 | */ |
||
42 | 184 | public function buildFrom($from, $join) |
|
57 | |||
58 | /** |
||
59 | * |
||
60 | * Builds the GROUP BY clause. |
||
61 | * |
||
62 | * @return string |
||
63 | * |
||
64 | */ |
||
65 | 184 | public function buildGroupBy($group_by) |
|
73 | |||
74 | /** |
||
75 | * |
||
76 | * Builds the HAVING clause. |
||
77 | * |
||
78 | * @return string |
||
79 | * |
||
80 | */ |
||
81 | 184 | public function buildHaving($having) |
|
89 | |||
90 | /** |
||
91 | * |
||
92 | * Builds the FOR UPDATE clause. |
||
93 | * |
||
94 | * @return string |
||
95 | * |
||
96 | */ |
||
97 | 184 | public function buildForUpdate($for_update) |
|
105 | } |
||
106 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: