protected function normalizeOrder($order)
    {
        switch (strtolower($order)) {
            case 'asc':
                return 'asc';
            case 'desc':
                return 'desc';
            default:
                throw new QueryException(sprintf('Unsupported sorting method "%s" in query "%s"', $this->getType($order), $this->model->entity()));

        }
    }
protected function normalizeOrder($order)
    {
        switch (strtolower($order)) {
            case 'asc':
                return 'asc';
            case 'desc':
                return 'desc';
            default:
                throw new QueryException(sprintf('Unsupported sorting method "%s" in query "%s"', $this->getType($order), $this->model->entity()));

        }
    }
protected function normalizeOrder ( $ order ) { switch ( strtolower ( $ order ) ) { case 'asc' : return 'asc' ; case 'desc' : return 'desc' ; default : throw new QueryException ( sprintf ( 'Unsupported sorting method "%s" in query "%s"' , $ this -> getType ( $ order ) , $ this -> model -> entity ( ) ) ) ; } }
Asserts correct order

@param string $order

@return string
@throws QueryException
Asserts correct order