1 | <?php |
||
31 | trait ClauseTrait |
||
32 | { |
||
33 | use QuoteTrait; |
||
34 | |||
35 | /** |
||
36 | * storage for clauses |
||
37 | * |
||
38 | * @var array |
||
39 | * @access protected |
||
40 | */ |
||
41 | protected $clause = []; |
||
42 | |||
43 | /** |
||
44 | * Is $str a raw sql string ? |
||
45 | * |
||
46 | * @param mixed $str |
||
47 | * @param bool $rawMode |
||
48 | * @access protected |
||
49 | */ |
||
50 | protected function isRaw($str, /*# bool */ $rawMode)/*# : bool */ |
||
62 | |||
63 | /** |
||
64 | * Quote an alias if not an int |
||
65 | * |
||
66 | * @param int|string $alias |
||
67 | * @param array $settings |
||
68 | * @return string |
||
69 | * @access protected |
||
70 | */ |
||
71 | protected function quoteAlias($alias, array $settings)/*# : string */ |
||
78 | |||
79 | /** |
||
80 | * Quote an item if it is a field/column |
||
81 | * |
||
82 | * @param string|StatementInterface $item |
||
83 | * @param array $settings |
||
84 | * @param bool $rawMode |
||
85 | * @access protected |
||
86 | */ |
||
87 | protected function quoteItem( |
||
107 | |||
108 | /** |
||
109 | * Return specific clause part |
||
110 | * |
||
111 | * @param string $clauseName |
||
112 | * @param array |
||
113 | * @access protected |
||
114 | */ |
||
115 | protected function &getClause(/*# string */ $clauseName)/*# : array */ |
||
126 | |||
127 | /** |
||
128 | * Quote string even space found |
||
129 | * |
||
130 | * @param string $str |
||
131 | * @param string $prefix |
||
132 | * @param string $suffix |
||
133 | * @return string |
||
134 | * @access protected |
||
135 | */ |
||
136 | protected function quoteSpace( |
||
143 | |||
144 | /** |
||
145 | * Process value |
||
146 | * |
||
147 | * @param mixed $value |
||
148 | * @return string |
||
149 | * @access protected |
||
150 | */ |
||
151 | protected function processValue($value)/*# : string */ |
||
156 | |||
157 | /** |
||
158 | * Join each clause |
||
159 | * |
||
160 | * @param string $prefix |
||
161 | * @param string $seperator |
||
162 | * @param array $clause |
||
163 | * @param array $settings |
||
164 | * @return string |
||
165 | * @access protected |
||
166 | */ |
||
167 | protected function joinClause( |
||
181 | } |
||
182 |