protected static function restGetSortDirection($default = 1)
    {
        $sort = Request::getInstance()->query('_sort', false);
        if (!$sort) {
            return $default;
        }

        $sortDirection = substr($sort, 0, 1);
        if ($sortDirection == '+') {
            return 1;
        }

        if ($sortDirection == '-') {
            return -1;
        }

        return $default;
    }