diff -r 000000000000 -r 7f95f8617b0b vendor/doctrine/lib/Doctrine/ORM/Query/Expr/Join.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/doctrine/lib/Doctrine/ORM/Query/Expr/Join.php Sat Sep 24 15:40:41 2011 +0200 @@ -0,0 +1,67 @@ +. + */ + +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; + private $_indexBy; + + public function __construct($joinType, $join, $alias = null, $conditionType = null, $condition = null, $indexBy = null) + { + $this->_joinType = $joinType; + $this->_join = $join; + $this->_alias = $alias; + $this->_conditionType = $conditionType; + $this->_condition = $condition; + $this->_indexBy = $indexBy; + } + + public function __toString() + { + return strtoupper($this->_joinType) . ' JOIN ' . $this->_join + . ($this->_alias ? ' ' . $this->_alias : '') + . ($this->_condition ? ' ' . strtoupper($this->_conditionType) . ' ' . $this->_condition : '') + . ($this->_indexBy ? ' INDEX BY ' . $this->_indexBy : ''); + } +} \ No newline at end of file