NilPortugues\Sql\QueryBuilder\Manipulation\Select::orderBy PHP Метод

orderBy() публичный Метод

public orderBy ( string $column, string $direction = OrderBy::ASC, null $table = null )
$column string
$direction string
$table null
    public function orderBy($column, $direction = OrderBy::ASC, $table = null)
    {
        $current = parent::orderBy($column, $direction, $table);
        if ($this->getParentQuery() != null) {
            $this->getParentQuery()->orderBy($column, $direction, \is_null($table) ? $this->getTable() : $table);
        }
        return $current;
    }

Usage Example

Пример #1
0
 /**
  * @param string $column
  * @param string $direction
  * @param null   $table
  *
  * @return Select
  */
 public function orderBy($column, $direction = OrderBy::ASC, $table = null)
 {
     return $this->select->orderBy($column, $direction, $table);
 }