* @copyright 2010-2014 Justin Swanhart and André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * @version SVN: $Id: JoinBuilder.php 830 2013-12-18 09:35:42Z phosco@gmx.de $ * */ require_once dirname(__FILE__) . '/../exceptions/UnsupportedFeatureException.php'; /** * This class implements the builder for the JOIN statement parts (within FROM). * You can overwrite all functions to achieve another handling. * * @author André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * */ class JoinBuilder { public function build($parsed) { if ($parsed === 'CROSS') { return ", "; } if ($parsed === 'JOIN') { return " INNER JOIN "; } if ($parsed === 'LEFT') { return " LEFT JOIN "; } if ($parsed === 'RIGHT') { return " RIGHT JOIN "; } // TODO: add more throw new UnsupportedFeatureException($parsed); } } ?>