LMongo\Query\Builder::prepareOrderBy PHP Method

prepareOrderBy() private method

Transform sql style order statement to mongodb style.
private prepareOrderBy ( mixed $direction ) : integer
$direction mixed
return integer
    private function prepareOrderBy($direction)
    {
        if ('asc' == $direction) {
            $direction = 1;
        } elseif ('desc' == $direction) {
            $direction = -1;
        }
        return $direction;
    }
Builder