public function sort($field, $asc = true)
	{
		usort($this->rows, function($a, $b) use ($field, $asc)
		{
			$result = strcmp($a->$field, $b->$field);

			return ($asc) ? $result : $result * -1;
		});

		return $this;
	}
public function sort($field, $asc = true)
	{
		usort($this->rows, function($a, $b) use ($field, $asc)
		{
			$result = strcmp($a->$field, $b->$field);

			return ($asc) ? $result : $result * -1;
		});

		return $this;
	}
public function sort ( $ field , $ asc = true ) { usort ( $ this -> rows , function ( $ a , $ b ) use ( $ field , $ asc ) { $ result = strcmp ( $ a -> $ field , $ b -> $ field ) ; return ( $ asc ) ? $ result : $ result * - 1 ; } ) ; return $ this ; }
Sorts the rows by a given field

@param   string  $field  The field to sort by
@param   bool    $asc    True if sort direction is ascending, false for descending
@return  $this
@since   2.0.0
Sorts the rows by a given field