. */ /** * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}* * * @author Guilherme Blanco * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://www.phpdoctrine.org * @since 2.0 * @version $Revision$ */ class Doctrine_ORM_Query_AST_IdentificationVariableDeclaration extends Doctrine_ORM_Query_AST { protected $_rangeVariableDeclaration = null; protected $_indexBy = null; protected $_joinVariableDeclarations = array(); public function __construct($rangeVariableDecl, $indexBy, array $joinVariableDecls) { $this->_rangeVariableDeclaration = $rangeVariableDecl; $this->_indexBy = $indexBy; $this->_joinVariableDeclarations = $joinVariableDecls; } /* Getters */ public function getRangeVariableDeclaration() { return $this->_rangeVariableDeclaration; } public function getIndexBy() { return $this->_indexBy; } public function getJoinVariableDeclarations() { return $this->_joinVariableDeclarations; } /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ public function buildSql() { $str = $this->_rangeVariableDeclaration->buildSql(); for ($i = 0, $l = count($this->_joinVariableDeclarations); $i < $l; $i++) { $str .= ' ' . $this->_joinVariableDeclarations[$i]->buildSql(); } return $str; } }