. */ /** * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable * * @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_RangeVariableDeclaration extends Doctrine_ORM_Query_AST { protected $_abstractSchemaName = null; protected $_aliasIdentificationVariable = null; /* Setters */ public function setAbstractSchemaName($abstractSchemaName) { $this->_abstractSchemaName = $abstractSchemaName; } public function setAliasIdentificationVariable($aliasIdentificationVariable) { $this->_aliasIdentificationVariable = $aliasIdentificationVariable; } /* Getters */ public function getAbstractSchemaName() { return $this->_abstractSchemaName; } public function getAliasIdentificationVariable() { return $this->_aliasIdentificationVariable; } /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ public function buildSql() { // Retrieving connection $conn = $this->_parserResult->getEntityManager()->getConnection(); // Component alias $componentAlias = $this->_aliasIdentificationVariable; // Retrieving required information try { $queryComponent = $this->_parserResult->getQueryComponent($componentAlias); $classMetadata = $queryComponent['metadata']; } catch (Doctrine_Exception $e) { $this->_parser->semanticalError($e->getMessage()); return; } return $conn->quoteIdentifier($classMetadata->getTableName()) . ' ' . $conn->quoteIdentifier($this->_parserResult->getTableAliasFromComponentAlias($componentAlias)); } }