. */ namespace Doctrine\ORM\Query\Expr; /** * Expression class for DQL from * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision$ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ class Join { const INNER_JOIN = 'INNER'; const LEFT_JOIN = 'LEFT'; const ON = 'ON'; const WITH = 'WITH'; private $_joinType; private $_join; private $_alias; private $_conditionType; private $_condition; public function __construct($joinType, $join, $alias = null, $conditionType = null, $condition = null) { $this->_joinType = $joinType; $this->_join = $join; $this->_alias = $alias; $this->_conditionType = $conditionType; $this->_condition = $condition; } public function __toString() { return strtoupper($this->_joinType) . ' JOIN ' . $this->_join . ($this->_alias ? ' ' . $this->_alias : '') . ($this->_condition ? ' ' . strtoupper($this->_conditionType) . ' ' . $this->_condition : ''); } }