protected function getFilterRange($operator, $start, $end)
    {
        if (($operator === Operator::LT) || ($operator === Operator::LTE)) {
            $end = $start;
            $start = null;
        }

        switch ($operator) {
            case Operator::GT:
                $range = array(
                    'gt' => $start,
                );
                break;

            case Operator::GTE:
                $range = array(
                    'gte' => $start,
                );
                break;

            case Operator::LT:
                $range = array(
                    'lt' => $end,
                );
                break;

            case Operator::LTE:
                $range = array(
                    'lte' => $end,
                );
                break;

            case Operator::BETWEEN:
                $range = array(
                    'gte' => $start,
                    'lte' => $end,
                );
                break;

            default:
                throw new RuntimeException("Unknown operator '{$operator}'");
        }

        return $range;
    }