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( |
||
101 | |||
102 | /** |
||
103 | * Quote object |
||
104 | * |
||
105 | * @param object $object |
||
106 | * @param array $settings |
||
107 | * @return string |
||
108 | * @access protected |
||
109 | */ |
||
110 | protected function quoteObject($object, $settings)/*# : string */ |
||
124 | |||
125 | /** |
||
126 | * Return specific clause part |
||
127 | * |
||
128 | * @param string $clauseName |
||
129 | * @param array |
||
130 | * @access protected |
||
131 | */ |
||
132 | protected function &getClause(/*# string */ $clauseName)/*# : array */ |
||
143 | |||
144 | /** |
||
145 | * Quote string even space found |
||
146 | * |
||
147 | * @param string $str |
||
148 | * @param string $prefix |
||
149 | * @param string $suffix |
||
150 | * @return string |
||
151 | * @access protected |
||
152 | */ |
||
153 | protected function quoteSpace( |
||
160 | |||
161 | /** |
||
162 | * Process value |
||
163 | * |
||
164 | * @param mixed $value |
||
165 | * @return string |
||
166 | * @access protected |
||
167 | */ |
||
168 | protected function processValue($value)/*# : string */ |
||
173 | |||
174 | /** |
||
175 | * Join each clause |
||
176 | * |
||
177 | * @param string $prefix |
||
178 | * @param string $seperator |
||
179 | * @param array $clause |
||
180 | * @param array $settings |
||
181 | * @return string |
||
182 | * @access protected |
||
183 | */ |
||
184 | protected function joinClause( |
||
198 | } |
||
199 |