public function add($name, $direction)
    {
        if (!in_array($name, $this->keys, true)) {
            throw new Exceptions\InvalidSorterFieldException($name);
        }
        if (!in_array($direction, ['asc', 'desc'], true)) {
            throw new Exceptions\InvalidSorterDirectionException($direction);
        }

        $field = new SorterField();
        $field->setName($name);
        $field->setDirection($direction);
        $this->values[] = $field;
    }