function orderBy( $column, $direction = "ASC" ) {

        $clone = clone $this;

        if ($direction===true) {
            $clone->orderBy[] = $column;
        }else{
            $clone->orderBy[] = $this->db->quoteIdentifier( $column ) . " " . $direction;
        }

        return $clone;

    }
function orderBy( $column, $direction = "ASC" ) {

        $clone = clone $this;

        if ($direction===true) {
            $clone->orderBy[] = $column;
        }else{
            $clone->orderBy[] = $this->db->quoteIdentifier( $column ) . " " . $direction;
        }

        return $clone;

    }
function orderBy ( $ column , $ direction = "ASC" ) { $ clone = clone $ this ; if ( $ direction === true ) { $ clone -> orderBy [ ] = $ column ; } else { $ clone -> orderBy [ ] = $ this -> db -> quoteIdentifier ( $ column ) . " " . $ direction ; } return $ clone ; }
Add an ORDER BY column and direction

@param string $column
@param string $direction
@return $this
Add an ORDER BY column and direction