for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JAQB\Query\Traits;
trait OrderBy
{
/**
* @var OrderStatement
*/
protected $orderBy;
* Sets the order for the query.
*
* @param string|array $fields
* @param string $direction
* @return self
public function orderBy($fields, $direction = false)
$this->orderBy->addFields($fields, $direction);
return $this;
}
* Gets the order by statement for the query.
* @return OrderByStatement
public function getOrderBy()
return $this->orderBy;