Adds zero or more values to the set.

@param mixed[] $input

@return \PlanB\DS\Set\SetInterface
172207
public function addAll(iterable $input): SetInterface
    {
        foreach ($input as $value) {
            $this->add($value);
        }

        return $this;
    }
855846
public function input($input = null, $default = null)
    {
        // Get all inputs
        $inputs = array_merge($this->getInputs(), $this->additionalInputs);

        // Exclude reserved inputs
        foreach ($inputs as $key => $value) {
            if (in_array($key, $this->reserved)) {
                unset($inputs[$key]);
            }
        }

        // Return one input
        if ($input) {
            return isset($inputs[$input])? $inputs[$input] : $default;
        }

        // Or the complete array of inputs
        return $inputs;
    }
1133626
public function interpolate($input)
    {
        $keys = array_keys($this->interpolation_vars);
        $values = array_values($this->interpolation_vars);
        return str_replace($keys, $values, $input);
    }
984039
private function _initialise(array $input = array())
	{
		foreach ($input as $key => $object)
		{
			if (!is_null($object))
			{
				$this->offsetSet($key, $object);
			}
		}

		$this->rewind();
	}
307751
public function create(array $inputs = [])
    {
        $inputs = $this->purifyInputs($inputs);

        return $this->model->create($inputs);
    }
1236987
public static function addAbs($input)
    {
        $tmp = 0;
        $sum = 0;
        foreach($input as $tmp){
            $sum = $sum + abs($tmp);
        }
        return $sum;
    }
968274
public function prepend($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                $node->insertBefore($newNode, $node->contents()->first());
            }
        });

        return $this;
    }
452382
protected function flatten($input)
    {
        $list = [];

        foreach ($input as $item) {
            $list = array_merge($list, (array)$item);
        }

        return array_unique($list);
    }
788799
public function set($key, Input $input): self
    {
        if (!$input->isValid()) {
            return $this;
        }

        $value = $input->value();

        $this->mapOfValues[$key] = $value;

        return $this;
    }
680488
protected function getInputValue($input)
    {
        if ($input->attr('type') == 'checkbox' or $input->attr('type') == 'radio') {
            $values = [];

            foreach ($input->filter(':checked') as $checkbox) {
                $values[] = $checkbox->getAttribute('value');
            }

            return $values;
        }

        return (new InputFormField($input->getNode(0)))->getValue();
    }
911955
private function combine(array $input)
    {
        $inputLength = count($input);
        if (0 === $inputLength) {
            return false;
        }

        foreach ($this->namePrepData->replaceMaps as $namePrepSource => $namePrepTarget) {
            if ($namePrepTarget[0] !== $input[0]) {
                continue;
            }
            if (count($namePrepTarget) !== $inputLength) {
                continue;
            }
            $hit = false;
            foreach ($input as $k2 => $v2) {
                if ($v2 === $namePrepTarget[$k2]) {
                    $hit = true;
                } else {
                    $hit = false;
                    break;
                }
            }
            if ($hit) {
                return $namePrepSource;
            }
        }

        return false;
    }
1113915
public function setInput($input)
    {
        $this->input        = $input;
        $this->currentInput = $input;
        $this->currentPos   = 0;
        $this->currentToken = null;
    }
931939
public function addInput($input, $silent = false)
    {
        foreach ((array) $input as $line) {
            $this->inputBuffer[] = $silent ? new SilentInput($line) : $line;
        }
    }
661556
public function prepare($input)
    {
        $form = $this->buildEmbeddedForm();

        return $form->setOriginal($this->original)->prepare($input);
    }
1226771
protected function arrayToConditionDataModel(array $input)
    {
        /** @var \Smile\ElasticsuiteCatalogRule\Model\Data\Condition $conditionDataModel */
        $conditionDataModel = $this->conditionDataFactory->create();
        foreach ($input as $key => $value) {
            switch ($key) {
                case 'type':
                    $conditionDataModel->setConditionType($value);
                    break;
                case 'attribute':
                    $conditionDataModel->setAttributeName($value);
                    break;
                case 'operator':
                    $conditionDataModel->setOperator($value);
                    break;
                case 'value':
                    $conditionDataModel->setValue($value);
                    break;
                case 'aggregator':
                    $conditionDataModel->setAggregatorType($value);
                    break;
                case 'conditions':
                    $conditions = [];
                    foreach ($value as $condition) {
                        $conditions[] = $this->arrayToConditionDataModel($condition);
                    }
                    $conditionDataModel->setConditions($conditions);
                    break;
                default:
            }
        }

        return $conditionDataModel;
    }
238663
public function store($input)
    {
        $this->model = $this->model->fill($input);

        $filteredInput = $this->runChecks('store', $this->model->toArray());

        if ($filteredInput) {
            $this->model->fill($filteredInput);
        }

        return $this->model->save();
    }
375492
public static function createFromArray(array $input): self
    {
        if (2 != count($input)) {
            throw new InvalidArgumentException(
                sprintf("%s() expects an array with exactly two elements", __METHOD__)
            );
        }
        if (array_key_exists('center', $input) && array_key_exists('radius', $input)) {
            $center = $input['center'];
            $radius = $input['radius'];
        } else {
            $center = array_shift($input);
            $radius = array_shift($input);
        }
        if (is_array($center)) {
            $center = Point::createFromArray($center);
        }
        return new self($center, $radius);
    }