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

        $sorters = [];
        $fields = explode(',', $sort);
        foreach ($fields as $sort) {
            $sortField = $sort;
            $sortDirection = 1;

            $sortDirectionSign = substr($sort, 0, 1);
            if ($sortDirectionSign == '+' || $sortDirectionSign == '-') {
                $sortField = substr($sort, 1);
                $sortDirection = $sortDirectionSign == '+' ? 1 : -1;
            }

            $sorters[$sortField] = $sortDirection;
        }

        return $sorters;
    }