@param string|NodeList|\DOMNode|callable $input

@return self
513821
public function setText($input): self {
        if (is_string($input)) {
            $input = new Text($input);
        }

        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            // Remove old contents from the current node.
            $node->contents()->remove();

            // Add new contents in it's place.
            $node->append(new Text($newNodes->getText()));
        });

        return $this;
    }
782458
public function unserialize($input)
	{
		$input = unserialize($input);

		if (!($input instanceof Input))
		{
			throw new \UnexpectedValueException(sprintf('%s would not accept a `%s`.', __METHOD__, \gettype($this->input)));
		}

		$this->setInput($input);

		return $this;
	}
1345005
public function setRepeat($input)
    {
        if (!is_numeric($input) || !$input) {
            throw new \InvalidArgumentException('Only positive numbers allowed.');
        }
        $this->otherOptions['repeat'] = (float)$input;

        return $this;
    }
1331041
protected function createResourceFile($input)
    {

        $this->call(
            'resource-file:from-database',
            [
                'model-name' => $input->modelName,
                '--table-name' => $input->table,
                '--resource-filename' => $input->resourceFile,
                '--translation-for' => $input->translationFor,
                '--force' => $input->force,
            ]
        );

        return $this;
    }
118260
public function withInput(array $input = null)
    {
        $input = $input ?: $this->request->input();

        $this->session->flashInput(array_filter($input, function ($value)
        {
            return ! $value instanceof SymfonyUploadedFile;
        }));

        return $this;
    }
1315059
public function appendTo($selector): self {
        if ($selector instanceof \DOMNode || $selector instanceof NodeList) {
            $nodes = $this->inputAsNodeList($selector);
        } else {
            $nodes = $this->document()->find($selector);
        }

        $nodes->append($this);

        return $this;
    }
1175943
public static function validate($input)
    {
        if (is_string($input)) {
            $doc = new DOMDocument();
            $doc->preserveWhiteSpace = false;

            if (!@$doc->loadXML($input)) {
                throw InvalidXmlException::lastError();
            }

            $input = $doc;
        } elseif (!($input instanceof DOMDocument)) {
            throw InvalidArgumentException::create(
                'The $input argument must be an instance of DOMDocument, %s given.',
                gettype($input)
            );
        }

        if (!@$input->schemaValidate(self::SCHEMA)) {
            throw InvalidXmlException::lastError();
        }
    }
973258
public function parse($input)
    {
        $this->inValuePath = false;
        $this->lexer->setInput($input);
        $this->lexer->moveNext();

        $node = null;
        if ($this->mode->equals(Mode::FILTER)) {
            $node = $this->disjunction();
        } else {
            $node = $this->path();
        }

        $this->match(null);

        return $node;
    }
73270
public static function typed(string $type, iterable $input = []): Set
    {
        $resolver = Resolver::typed($type);

        return new static($input, $resolver);
    }
1242402
public function setInput($input)
    {
        // Resetting the parser
        $this->lineIndex = 0;
        $this->startLine = 0;

        if (is_string($input)) {
            // Convering to a stream.
            $stream = fopen('php://temp', 'r+');
            fwrite($stream, $input);
            rewind($stream);
            $this->input = $stream;
        } elseif (is_resource($input)) {
            $this->input = $input;
        } else {
            throw new \InvalidArgumentException('This parser can only read from strings or streams.');
        }
    }
943116
public static function fromString(string $input): self
    {
        $data = explode('-', $input);
        if (!isset($data[0]) || !isset($data[1])) {
            throw new \InvalidArgumentException('Can not parse week from string "' . $input . '", format should be "YYYY-Www"');
        }

        $self = new self(strtotime($input));
        return $self;
    }
743493
protected function inputAsFirstNode($input): ?\DOMNode {
        $nodes = $this->inputAsNodeList($input);

        return $nodes->findXPath('self::*')->first();
    }
614876
public function send($input)
    {
        if (stripos(strrev($input), PHP_EOL) === false) {
            $input = $input . PHP_EOL;
        }

        $this->steps[] = [self::SEND, $input];

        return $this;
    }
713480
public function setInput($input)
    {
        $this->input    = $input;

        $this->pos      = 0;

        $this->line     = 0;

        $this->linePos  = 0;

        $this->tokenType = TokenType::BOF;

        $this->tokenValue = null;

        $this->length   = strlen($this->input);
    }
997147
public function prepare($input)
    {
        foreach ($input as $key => $record) {
            $this->setFieldOriginalValue($key);
            $input[$key] = $this->prepareValue($key, $record);
        }

        return $input;
    }
241401
public function setInput($input)
    {
        if (is_resource($input)) {
            $input = stream_get_contents($input);
        }

        if (is_string($input)) {
            $reader = new SabreXml\Reader();
            $reader->elementMap['{'.self::XCAL_NAMESPACE.'}period']
                = 'Sabre\VObject\Parser\XML\Element\KeyValue';
            $reader->elementMap['{'.self::XCAL_NAMESPACE.'}recur']
                = 'Sabre\VObject\Parser\XML\Element\KeyValue';
            $reader->xml($input);
            $input = $reader->parse();
        }

        $this->input = $input;
    }
683195
public function has($input): NodeList {
        if ($input instanceof NodeList || $input instanceof \DOMNode) {
            $inputNodes = $this->inputAsNodeList($input, false);

            $fn = function($node) use ($inputNodes) {
                $descendantNodes = $node->find('*', 'descendant::');

                // Determine if we have a descendant match.
                return $inputNodes->reduce(function($carry, $inputNode) use ($descendantNodes) {
                    // Match descendant nodes against input nodes.
                    if ($descendantNodes->exists($inputNode)) {
                        return true;
                    }

                    return $carry;
                }, false);
            };

        } elseif (is_string($input)) {
            $fn = function($node) use ($input) {
                return $node->find($input, 'descendant::')->count() != 0;
            };

        } elseif (is_callable($input)) {
            $fn = $input;

        } else {
            throw new \InvalidArgumentException('Unexpected input value of type "' . gettype($input) . '"');
        }

        return $this->getNodesMatchingInput($fn);
    }