* @copyright 2010-2014 Justin Swanhart and André Rothe * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * @version SVN: $Id$ * */ namespace PHPSQLParser\builders; /** * This class implements the builder for expressions within the ORDER-BY part. * It must contain the direction. * 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 OrderByExpressionBuilder extends WhereExpressionBuilder { protected function buildDirection($parsed) { $builder = new DirectionBuilder(); return $builder->build($parsed); } public function build(array $parsed) { $sql = parent::build($parsed); if ($sql !== '') { $sql .= $this->buildDirection($parsed); } return $sql; } } ?>