From 289ce4727b13b168e30e59bebd8c7601a3c6ea90 Mon Sep 17 00:00:00 2001 From: beberlei Date: Sun, 4 Apr 2010 22:24:37 +0000 Subject: [PATCH] [2.0] DDC-492 - Allow access to ParserResult and Query in TreeWalkerAdapter --- lib/Doctrine/ORM/Query/TreeWalkerAdapter.php | 25 +++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php b/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php index 16a3c8f99..669409630 100644 --- a/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php +++ b/lib/Doctrine/ORM/Query/TreeWalkerAdapter.php @@ -43,11 +43,34 @@ abstract class TreeWalkerAdapter implements TreeWalker $this->_parserResult = $parserResult; $this->_queryComponents = $queryComponents; } - + + /** + * @return array + */ protected function _getQueryComponents() { return $this->_queryComponents; } + + /** + * Retrieve Query Instance reponsible for the current walkers execution. + * + * @return Doctrine\ORM\Query + */ + protected function _getQuery() + { + return $this->_query; + } + + /** + * Retrieve ParserResult + * + * @return Doctrine\ORM\Query\ParserResult + */ + protected function _getParserResult() + { + return $this->_parserResult; + } /** * Walks down a SelectStatement AST node, thereby generating the appropriate SQL.