Adds all enumerator objects or values of the given iterable
@param iterable $enumerators Iterable list of enumerator objects or values
@return void
@throws InvalidArgumentException On an invalid given enumerator
976338
public function addIterable(iterable $enumerators): void
    {
        $bitset = $this->bitset;

        try {
            foreach ($enumerators as $enumerator) {
                $this->{$this->fnDoSetBit}(($this->enumeration)::get($enumerator)->getOrdinal());
            }
        } catch (\Throwable $e) {
            // reset all changes until error happened
            $this->bitset = $bitset;
            throw $e;
        }
    }
1302263
public function addRepositories($repositories)
    {
        if (!is_array($repositories) && (!is_object($repositories) || !$repositories instanceof \Traversable)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid argument provided for $repositories, expecting either an array or Traversable object, but' .
                ' "%s" given',
                is_object($repositories) ? get_class($repositories) : gettype($repositories)
            ));
        }
        foreach ($repositories as $repo) {
            $this->addRepository($repo);
        }
    }
1122719
public function addMinifier($minifier)
    {
        if (!isset(class_implements($minifier)[MinifierInterface::class])) {
            throw new InvalidArgumentException('The class ['.$minifier.'] should be a member of the ['.MinifierInterface::class.']');
        } elseif (in_array($minifier, $this->minifiers)) {
            throw new InvalidArgumentException('The minifier ['.$minifier.'] is already added to the minifier!');
        }

        $this->minifiers[] = $minifier;

        return $this->minifiers;
    }
560445
public function addValidators(Validator\ValidatorInterface ...$validators) {
        foreach($validators as $validator) {
            $this->addValidator($validator);
        }
        return $this;
    }
456736
public function append(iterable $values): self
    {
        foreach ($values as $value) {
            $this->add($value);
        }

        return $this;
    }
65531
public function set($key, $value)
    {
        if (!is_null($key)
            && is_scalar($key)
        ) {
            return $this->_items[$key] = $value;
        } else {
            // given index name is not valid
            throw new EnumeratorException('Element could not be added to list. Index is not valid.', E_NOTICE);
        }
    }
81668
public function add(BaseOperator ...$operators)
    {
        foreach ($operators as $operator) {
            if ($operator instanceof bAnd) {
                $this->operators['and'][] = $operator;
            } elseif ($operator instanceof bOr) {
                $this->operators['or'][] = $operator;
            } elseif ($operator instanceof bNot) {
                $this->operators['not'][] = $operator;
            } elseif ($operator instanceof Wildcard) {
                $this->operators['wildcard'][] = $operator;
            } elseif ($operator instanceof MatchingRule) {
                $this->operators['matchingrule'][] = $operator;
            } elseif ($operator instanceof Comparison) {
                $this->operators['comparison'][] = $operator;
            } else {
                throw new InvalidArgumentException('Unknown operator type.');
            }
        }
        
        return $this;
    }
231239
public function setOperators(array $operators)
    {
        $invalid = [];
        if (!$this->validateOperators($operators, $invalid)) {
            throw new \InvalidArgumentException(\sprintf('Trying to set invalid operator(s) "%s" for filter "%s"', \implode(', ', $operators), $this->getName()));
        }
        $this->operators = $operators;

        return $this;
    }
708047
public function setModifiers(array $modifiers)
    {
        $modifiers = array_map('strtolower', $modifiers);

        // Validate modifiers are supported
        $allowed = $this->getSupportedModifiers();
        $unsupported = array_diff($modifiers, $allowed);
        if ($unsupported) {
            throw new InvalidArgumentException(
                static::class . ' does not accept ' . implode(', ', $unsupported) . ' as modifiers'
            );
        }

        $this->modifiers = $modifiers;
    }
1137458
public function setItems($items)
    {
        $orderItems = [];
        foreach ($items as $item) {
            if (is_array($item)) {
                $orderItems[] = new Item($item);
            } elseif (! ($item instanceof Item)) {
                throw new \InvalidArgumentException('Item should be an instance of ' . Item::class);
            }
        }

        return parent::setItems($orderItems);
    }
927114
public function setFilters(array $filters)
    {
        foreach ($filters as $filter) {
            if (! $filter instanceof Filter) {
                throw new InvalidArgumentException('Filter have to be an instanceof ZfcDatagrid\Filter');
            }
        }

        $this->filters = $filters;
    }
946607
public function addValidators(array $validators)
    {
        foreach ($validators as $validator) {
            if ($validator === null) {
                continue;
            }

            $this->addValidator($validator);
        }

        return $this;
    }
284417
public function setCustomValues($customValues)
    {
        if (!is_array($customValues) && !($customValues instanceof \Traversable)) {
            throw new \InvalidArgumentException('You should pass an array or a collection of key-value pairs');
        }

        $this->customValues = array();

        foreach ($customValues as $element => $value) {
            $this->addCustomValue($element, $value);
        }

        return $this;
    }
80397
public function offsetExists($enumerator): bool
    {
        try {
            return isset($this->map[($this->enumeration)::get($enumerator)->getOrdinal()]);
        } catch (InvalidArgumentException $e) {
            // An invalid enumerator can't be an offset of this map
            return false;
        }
    }
1258251
public function add($items = [])
    {
        if (!is_array($items) || func_num_args() > 1) {
            $items = func_get_args();
        }

        $this->push($this->formatInnerField(null, $items));
    }
1207502
public function addRows($rows, Style $style = null)
    {
        if (!is_array($rows) && false === $rows instanceof \Traversable) {
            throw new \InvalidArgumentException('Expected array or traversable object as rows');
        }

        foreach ($rows as $row) {
            $this->addRow($row, $style);
        }
    }
731460
public function setAcceptedCardinalities(array $acceptedCardinalities)
    {
        foreach ($acceptedCardinalities as $cardinality) {
            if (!in_array($cardinality, OperatorCardinality::asArray(), true)) {
                $msg = "Accepted cardinalities must be values from the Cardinality enumeration, '" . $cardinality . "' given";
                throw new InvalidArgumentException($msg);
            }
        }

        $this->acceptedCardinalities = $acceptedCardinalities;
    }