1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php

441 lines
7.9 KiB
PHP
Raw Normal View History

2009-06-14 21:34:28 +04:00
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
2012-05-26 16:37:00 +04:00
* and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>.
*/
2009-06-14 21:34:28 +04:00
namespace Doctrine\ORM\Query;
/**
* An adapter implementation of the TreeWalker interface. The methods in this class
* are empty. This class exists as convenience for creating tree walkers.
*
2009-06-14 21:34:28 +04:00
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
abstract class TreeWalkerAdapter implements TreeWalker
{
/**
* The original Query.
*
* @var \Doctrine\ORM\AbstractQuery
*/
private $_query;
/**
* The ParserResult of the original query that was produced by the Parser.
*
* @var \Doctrine\ORM\Query\ParserResult
*/
private $_parserResult;
/**
* The query components of the original query (the "symbol table") that was produced by the Parser.
*
* @var array
*/
private $_queryComponents;
/**
* {@inheritdoc}
*/
public function __construct($query, $parserResult, array $queryComponents)
{
$this->_query = $query;
$this->_parserResult = $parserResult;
$this->_queryComponents = $queryComponents;
}
/**
* {@inheritdoc}
*/
public function getQueryComponents()
{
return $this->_queryComponents;
}
/**
* {@inheritdoc}
*/
public function setQueryComponent($dqlAlias, array $queryComponent)
{
$requiredKeys = array('metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token');
if (array_diff($requiredKeys, array_keys($queryComponent))) {
throw QueryException::invalidQueryComponent($dqlAlias);
}
$this->_queryComponents[$dqlAlias] = $queryComponent;
}
/**
* @return array
*/
protected function _getQueryComponents()
{
return $this->_queryComponents;
}
/**
2013-03-11 04:08:58 +04:00
* Retrieves the Query Instance responsible for the current walkers execution.
*
* @return \Doctrine\ORM\AbstractQuery
*/
protected function _getQuery()
{
return $this->_query;
}
/**
* Retrieves the ParserResult.
*
* @return \Doctrine\ORM\Query\ParserResult
*/
protected function _getParserResult()
{
return $this->_parserResult;
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSelectStatement(AST\SelectStatement $AST)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSelectClause($selectClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkFromClause($fromClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkFunction($function)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkOrderByClause($orderByClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkOrderByItem($orderByItem)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkHavingClause($havingClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkJoin($join)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSelectExpression($selectExpression)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkQuantifiedExpression($qExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSubselect($subselect)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSubselectFromClause($subselectFromClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSimpleSelectClause($simpleSelectClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSimpleSelectExpression($simpleSelectExpression)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkAggregateExpression($aggExpression)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkGroupByClause($groupByClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkGroupByItem($groupByItem)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkUpdateStatement(AST\UpdateStatement $AST)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkDeleteStatement(AST\DeleteStatement $AST)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkDeleteClause(AST\DeleteClause $deleteClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkUpdateClause($updateClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkUpdateItem($updateItem)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkWhereClause($whereClause)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
*/
public function walkConditionalExpression($condExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkConditionalTerm($condTerm)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkConditionalFactor($factor)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
*/
public function walkConditionalPrimary($primary)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkExistsExpression($existsExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkCollectionMemberExpression($collMemberExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
*/
public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkNullComparisonExpression($nullCompExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkInExpression($inExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
*/
function walkInstanceOfExpression($instanceOfExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkLiteral($literal)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkBetweenExpression($betweenExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkLikeExpression($likeExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkStateFieldPathExpression($stateFieldPathExpression)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkComparisonExpression($compExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkInputParameter($inputParam)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkArithmeticExpression($arithmeticExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkArithmeticTerm($term)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkStringPrimary($stringPrimary)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkArithmeticFactor($factor)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
{
}
2009-06-14 21:34:28 +04:00
/**
* {@inheritdoc}
2009-06-14 21:34:28 +04:00
*/
public function walkPathExpression($pathExpr)
{
}
/**
* {@inheritdoc}
*/
public function walkResultVariable($resultVariable)
{
}
/**
* {@inheritdoc}
*/
public function getExecutor($AST)
{
}
2012-05-26 16:37:00 +04:00
}