1 | <?php |
||
6 | abstract class AbstractBuilder |
||
7 | { |
||
8 | 408 | public function __construct($quoter) |
|
12 | |||
13 | /** |
||
14 | * |
||
15 | * Builds the flags as a space-separated string. |
||
16 | * |
||
17 | * @return string |
||
18 | * |
||
19 | */ |
||
20 | 258 | public function buildFlags($flags) |
|
28 | |||
29 | /** |
||
30 | * |
||
31 | * Builds the `WHERE` clause of the statement. |
||
32 | * |
||
33 | * @return string |
||
34 | * |
||
35 | */ |
||
36 | 211 | public function buildWhere($where) |
|
44 | |||
45 | /** |
||
46 | * |
||
47 | * Builds the `ORDER BY ...` clause of the statement. |
||
48 | * |
||
49 | * @return string |
||
50 | * |
||
51 | */ |
||
52 | 211 | public function buildOrderBy($order_by) |
|
60 | |||
61 | /** |
||
62 | * |
||
63 | * Builds the `LIMIT` clause of the statement. |
||
64 | * |
||
65 | * @return string |
||
66 | * |
||
67 | */ |
||
68 | 9 | public function buildLimit($limit) |
|
75 | |||
76 | /** |
||
77 | * |
||
78 | * Builds the `LIMIT ... OFFSET` clause of the statement. |
||
79 | * |
||
80 | * @return string |
||
81 | * |
||
82 | */ |
||
83 | 159 | public function buildLimitOffset($limit, $offset) |
|
101 | |||
102 | /** |
||
103 | * |
||
104 | * Builds the `RETURNING` clause of the statement. |
||
105 | * |
||
106 | * @return string |
||
107 | * |
||
108 | */ |
||
109 | 11 | public function buildReturning($returning) |
|
117 | |||
118 | /** |
||
119 | * |
||
120 | * Returns an array as an indented comma-separated values string. |
||
121 | * |
||
122 | * @param array $list The values to convert. |
||
123 | * |
||
124 | * @return string |
||
125 | * |
||
126 | */ |
||
127 | 225 | public function indentCsv(array $list) |
|
132 | |||
133 | /** |
||
134 | * |
||
135 | * Returns an array as an indented string. |
||
136 | * |
||
137 | * @param array $list The values to convert. |
||
138 | * |
||
139 | * @return string |
||
140 | * |
||
141 | */ |
||
142 | 71 | public function indent(array $list) |
|
147 | } |
||
148 |
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: