Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / lib / Doctrine / ORM / Query / TreeWalkerAdapter.php
1 <?php
2 /*
3  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14  *
15  * This software consists of voluntary contributions made by many individuals
16  * and is licensed under the MIT license. For more information, see
17  * <http://www.doctrine-project.org>.
18  */
19
20 namespace Doctrine\ORM\Query;
21
22 /**
23  * An adapter implementation of the TreeWalker interface. The methods in this class
24  * are empty. This class exists as convenience for creating tree walkers.
25  *
26  * @author Roman Borschel <roman@code-factory.org>
27  * @since 2.0
28  */
29 abstract class TreeWalkerAdapter implements TreeWalker
30 {
31     private $_query;
32     private $_parserResult;
33     private $_queryComponents;
34
35     /**
36      * {@inheritdoc}
37      */
38     public function __construct($query, $parserResult, array $queryComponents)
39     {
40         $this->_query = $query;
41         $this->_parserResult = $parserResult;
42         $this->_queryComponents = $queryComponents;
43     }
44
45     /**
46      * @return array
47      */
48     protected function _getQueryComponents()
49     {
50         return $this->_queryComponents;
51     }
52
53     /**
54      * Retrieve Query Instance reponsible for the current walkers execution.
55      *
56      * @return \Doctrine\ORM\Query
57      */
58     protected function _getQuery()
59     {
60         return $this->_query;
61     }
62
63     /**
64      * Retrieve ParserResult
65      *
66      * @return \Doctrine\ORM\Query\ParserResult
67      */
68     protected function _getParserResult()
69     {
70         return $this->_parserResult;
71     }
72
73     /**
74      * Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
75      *
76      * @return string The SQL.
77      */
78     public function walkSelectStatement(AST\SelectStatement $AST) {}
79
80     /**
81      * Walks down a SelectClause AST node, thereby generating the appropriate SQL.
82      *
83      * @return string The SQL.
84      */
85     public function walkSelectClause($selectClause) {}
86
87     /**
88      * Walks down a FromClause AST node, thereby generating the appropriate SQL.
89      *
90      * @return string The SQL.
91      */
92     public function walkFromClause($fromClause) {}
93
94     /**
95      * Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
96      *
97      * @return string The SQL.
98      */
99     public function walkFunction($function) {}
100
101     /**
102      * Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
103      *
104      * @param OrderByClause
105      * @return string The SQL.
106      */
107     public function walkOrderByClause($orderByClause) {}
108
109     /**
110      * Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
111      *
112      * @param OrderByItem
113      * @return string The SQL.
114      */
115     public function walkOrderByItem($orderByItem) {}
116
117     /**
118      * Walks down a HavingClause AST node, thereby generating the appropriate SQL.
119      *
120      * @param HavingClause
121      * @return string The SQL.
122      */
123     public function walkHavingClause($havingClause) {}
124
125     /**
126      * Walks down a Join AST node and creates the corresponding SQL.
127      *
128      * @param Join $join
129      * @return string The SQL.
130      */
131     public function walkJoin($join) {}
132
133     /**
134      * Walks down a SelectExpression AST node and generates the corresponding SQL.
135      *
136      * @param SelectExpression $selectExpression
137      * @return string The SQL.
138      */
139     public function walkSelectExpression($selectExpression) {}
140
141     /**
142      * Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
143      *
144      * @param QuantifiedExpression
145      * @return string The SQL.
146      */
147     public function walkQuantifiedExpression($qExpr) {}
148
149     /**
150      * Walks down a Subselect AST node, thereby generating the appropriate SQL.
151      *
152      * @param Subselect
153      * @return string The SQL.
154      */
155     public function walkSubselect($subselect) {}
156
157     /**
158      * Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
159      *
160      * @param SubselectFromClause
161      * @return string The SQL.
162      */
163     public function walkSubselectFromClause($subselectFromClause) {}
164
165     /**
166      * Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
167      *
168      * @param SimpleSelectClause
169      * @return string The SQL.
170      */
171     public function walkSimpleSelectClause($simpleSelectClause) {}
172
173     /**
174      * Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
175      *
176      * @param SimpleSelectExpression
177      * @return string The SQL.
178      */
179     public function walkSimpleSelectExpression($simpleSelectExpression) {}
180
181     /**
182      * Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
183      *
184      * @param AggregateExpression
185      * @return string The SQL.
186      */
187     public function walkAggregateExpression($aggExpression) {}
188
189     /**
190      * Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
191      *
192      * @param GroupByClause
193      * @return string The SQL.
194      */
195     public function walkGroupByClause($groupByClause) {}
196
197     /**
198      * Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
199      *
200      * @param GroupByItem
201      * @return string The SQL.
202      */
203     public function walkGroupByItem($groupByItem) {}
204
205     /**
206      * Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
207      *
208      * @param UpdateStatement
209      * @return string The SQL.
210      */
211     public function walkUpdateStatement(AST\UpdateStatement $AST) {}
212
213     /**
214      * Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
215      *
216      * @param DeleteStatement
217      * @return string The SQL.
218      */
219     public function walkDeleteStatement(AST\DeleteStatement $AST) {}
220
221     /**
222      * Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
223      *
224      * @param DeleteClause
225      * @return string The SQL.
226      */
227     public function walkDeleteClause(AST\DeleteClause $deleteClause) {}
228
229     /**
230      * Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
231      *
232      * @param UpdateClause
233      * @return string The SQL.
234      */
235     public function walkUpdateClause($updateClause) {}
236
237     /**
238      * Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
239      *
240      * @param UpdateItem
241      * @return string The SQL.
242      */
243     public function walkUpdateItem($updateItem) {}
244
245     /**
246      * Walks down a WhereClause AST node, thereby generating the appropriate SQL.
247      *
248      * @param WhereClause
249      * @return string The SQL.
250      */
251     public function walkWhereClause($whereClause) {}
252
253     /**
254      * Walks down a ConditionalExpression AST node, thereby generating the appropriate SQL.
255      *
256      * @param ConditionalExpression
257      * @return string The SQL.
258      */
259     public function walkConditionalExpression($condExpr) {}
260
261     /**
262      * Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
263      *
264      * @param ConditionalTerm
265      * @return string The SQL.
266      */
267     public function walkConditionalTerm($condTerm) {}
268
269     /**
270      * Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
271      *
272      * @param ConditionalFactor
273      * @return string The SQL.
274      */
275     public function walkConditionalFactor($factor) {}
276
277     /**
278      * Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
279      *
280      * @param ConditionalPrimary
281      * @return string The SQL.
282      */
283     public function walkConditionalPrimary($primary) {}
284
285     /**
286      * Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
287      *
288      * @param ExistsExpression
289      * @return string The SQL.
290      */
291     public function walkExistsExpression($existsExpr) {}
292
293     /**
294      * Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
295      *
296      * @param CollectionMemberExpression
297      * @return string The SQL.
298      */
299     public function walkCollectionMemberExpression($collMemberExpr) {}
300
301     /**
302      * Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
303      *
304      * @param EmptyCollectionComparisonExpression
305      * @return string The SQL.
306      */
307     public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr) {}
308
309     /**
310      * Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
311      *
312      * @param NullComparisonExpression
313      * @return string The SQL.
314      */
315     public function walkNullComparisonExpression($nullCompExpr) {}
316
317     /**
318      * Walks down an InExpression AST node, thereby generating the appropriate SQL.
319      *
320      * @param InExpression
321      * @return string The SQL.
322      */
323     public function walkInExpression($inExpr) {}
324
325     /**
326      * Walks down an InstanceOfExpression AST node, thereby generating the appropriate SQL.
327      *
328      * @param InstanceOfExpression
329      * @return string The SQL.
330      */
331     function walkInstanceOfExpression($instanceOfExpr) {}
332
333     /**
334      * Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
335      *
336      * @param mixed
337      * @return string The SQL.
338      */
339     public function walkLiteral($literal) {}
340
341     /**
342      * Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
343      *
344      * @param BetweenExpression
345      * @return string The SQL.
346      */
347     public function walkBetweenExpression($betweenExpr) {}
348
349     /**
350      * Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
351      *
352      * @param LikeExpression
353      * @return string The SQL.
354      */
355     public function walkLikeExpression($likeExpr) {}
356
357     /**
358      * Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
359      *
360      * @param StateFieldPathExpression
361      * @return string The SQL.
362      */
363     public function walkStateFieldPathExpression($stateFieldPathExpression) {}
364
365     /**
366      * Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
367      *
368      * @param ComparisonExpression
369      * @return string The SQL.
370      */
371     public function walkComparisonExpression($compExpr) {}
372
373     /**
374      * Walks down an InputParameter AST node, thereby generating the appropriate SQL.
375      *
376      * @param InputParameter
377      * @return string The SQL.
378      */
379     public function walkInputParameter($inputParam) {}
380
381     /**
382      * Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
383      *
384      * @param ArithmeticExpression
385      * @return string The SQL.
386      */
387     public function walkArithmeticExpression($arithmeticExpr) {}
388
389     /**
390      * Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
391      *
392      * @param mixed
393      * @return string The SQL.
394      */
395     public function walkArithmeticTerm($term) {}
396
397     /**
398      * Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
399      *
400      * @param mixed
401      * @return string The SQL.
402      */
403     public function walkStringPrimary($stringPrimary) {}
404
405     /**
406      * Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
407      *
408      * @param mixed
409      * @return string The SQL.
410      */
411     public function walkArithmeticFactor($factor) {}
412
413     /**
414      * Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
415      *
416      * @param SimpleArithmeticExpression
417      * @return string The SQL.
418      */
419     public function walkSimpleArithmeticExpression($simpleArithmeticExpr) {}
420
421     /**
422      * Walks down an PathExpression AST node, thereby generating the appropriate SQL.
423      *
424      * @param mixed
425      * @return string The SQL.
426      */
427     public function walkPathExpression($pathExpr) {}
428
429     /**
430      * Walks down an ResultVariable AST node, thereby generating the appropriate SQL.
431      *
432      * @param string $resultVariable
433      * @return string The SQL.
434      */
435     public function walkResultVariable($resultVariable) {}
436
437     /**
438      * Gets an executor that can be used to execute the result of this walker.
439      *
440      * @return AbstractExecutor
441      */
442     public function getExecutor($AST) {}
443 }