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

@return self
968274
public function prepend($input): self {
        $this->manipulateNodesWithInput($input, function($node, $newNodes) {
            foreach ($newNodes as $newNode) {
                $node->insertBefore($newNode, $node->contents()->first());
            }
        });

        return $this;
    }
1315292
public static function custom($id, $input)
    {
        return (new static($id))->setInput($input instanceof BasicFormElement ? $input : new $input($id));
    }
1107013
public function modify($input)
    {
        foreach ($this->getModifiers() as $modifier) {
            $input = $modifier->modify($input);
        }

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

        return new static($input, $resolver);
    }
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;
    }
450933
public function setInput($input)
    {
        if (is_resource($input)) {
            $input = stream_get_contents($input);
        }
        if (is_string($input)) {
            $input = json_decode($input);
        }
        $this->input = $input;
    }
222024
public static function fromString(string $input): self
    {
        $input = preg_replace('/[^\d]/', '', $input);

        if (!is_numeric($input)) {
            throw new \InvalidArgumentException("Expects \$input to be a number, \"{$input}\" given.");
        }

        // Get the last digit.
        $checkDigit = (int) $input[strlen($input) - 1];

        // Remove the last digit.
        $number = substr($input, 0, strlen($input) - 1);

        return new self($number, $checkDigit);
    }
928031
public static function input(String $input) : Http
    {
        if( in_array($input, self::$types) )
        {
            self::$settings['input'] = $input;
        }
        else
        {
            throw new InvalidArgumentException('Error', 'invalidInput', $input.' : get, post, server, env, request');
        }

        return self::singleton();
    }
643784
public function replaceTableTokens(TableNode $input) {
    $table = $input->getTable();
    foreach ($table as $row => $values) {
      foreach ($values as $idx => $value) {
        $table[$row][$idx] = $this->replaceTokens($value);
      }
    }
    return new TableNode($table);
  }
1105127
public function withInput(array $input = null)
	{
		$input = $input ?: $this->request->input();

		$this->session->flashInput($data = array_filter($input, $callback = function (&$value) use (&$callback)
		{
			if (is_array($value))
			{
				$value = array_filter($value, $callback);
			}

			return ! $value instanceof UploadedFile;
		}));

		return $this;
	}
223271
protected function getNodesMatchingInput($input, bool $matchType = true): NodeList {
        if ($input instanceof NodeList || $input instanceof \DOMNode) {
            $inputNodes = $this->inputAsNodeList($input, false);

            $fn = function($node) use ($inputNodes) {
                return $inputNodes->exists($node);
            };


        } elseif (is_callable($input)) {
            // Since we're at the behest of the input callable, the 'matched'
            //  return value is always true.
            $matchType = true;

            $fn = $input;

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

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

        // Build a list of matching nodes.
        return $this->collection()->map(function($node) use ($fn, $matchType) {
            if ($fn($node) !== $matchType) {
                return null;
            }

            return $node;
        });
    }
1056729
public function wrapAll($input): self {
        if (!$this->collection()->count()) {
            return $this;
        }

        if (is_callable($input)) {
            $input = $input($this->collection()->first());
        }

        $inputNode = $this->inputAsFirstNode($input);

        if (!($inputNode instanceof Element)) {
            return $this;
        }

        $stackNodes = $this->_prepareWrapStack($inputNode);

        // Add the new bottom (root) node before the first matched node
        $this->collection()->first()->before($stackNodes->bottom());

        $this->collection()->each(function($node) use ($stackNodes) {
            // Detach and add node back inside the new wrappers top (leaf) node.
            $stackNodes->top()->append($node->detach());
        });

        return $this;
    }
1185663
public function canonicalize($input)
    {
        $filtered = preg_replace('/\D+/', '', $input) ?? '';
        if (strlen($filtered) !== $this->digitLength) {
            return $input;
        }

        return $filtered;
    }
120698
protected function tempInlineElements($input)
    {
        // Remove inline elements and replace them with text entities.
        if (preg_match_all('/<(' . implode('|', $this->inlineElements) . ')[^>]*>(?:[^<]*)<\/\1>/', $input, $matches)) {
            $this->temporaryReplacementsInline = $matches[0];

            foreach ($matches[0] as $i => $match) {
                $input = str_replace($match, 'ᐃ' . ($i + 1) . 'ᐃ', $input);
            }
        }

        return $input;
    }
292982
public function closest($input) {
        $results = $this->_walkPathUntil('parentNode', $input, null, self::$MATCH_TYPE_LAST);

        return $this->result($results);
    }
1080142
protected function parseXml($input)
    {
        if (class_exists('SimpleXMLElement')) {
            try {
                $backup = libxml_disable_entity_loader(true);
                $result = new \SimpleXMLElement($input);
                libxml_disable_entity_loader($backup);

                return $result;
            } catch (\Exception $e) {
                // Do nothing
            }
        }

        return $input;
    }
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;
	}