ホワイトリストにもとづきフィルタリングを行った結果を返します。
@param string $input
@return string HTMLの解析に失敗した場合は、空文字列を返します。
4990
public function filter(string $input): string
    {
        // 解析
        $body = $this->parse($input);
        if (!$body) {
            return '';
        }
        
        // beforeコールバック関数の実行
        if (isset($this->options['before']) && call_user_func($this->options['before'], $body) === false) {
            return '';
        }
        
        // 全ノードの走査
        $parent = $body;
        $previous = null;
        $current = $parent->firstChild;

        $html = $body->parentNode;
        while ($parent !== $html) {
            while ($current) {
                if ($this->filterNode($current)) {
                    // ノードが取り除かれたら
                    // 次の同胞に移動
                    $current = $previous ? $previous->nextSibling : $parent->firstChild;
                } else {
                    // 子に移動
                    $parent = $current;
                    $previous = null;
                    $current = $parent->firstChild;
                }
            }

            // 親に移動
            $previous = $parent;
            $current = $parent->nextSibling;
            $parent = $parent->parentNode;
        }
        
        // afterコールバック関数の実行
        if (isset($this->options['after']) && call_user_func($this->options['after'], $body) === false) {
            return '';
        }
        
        // 直列化
        $fragment = $body->ownerDocument->createDocumentFragment();
        while ($body->hasChildNodes()) {
            $fragment->appendChild($body->firstChild);
        }
        return (new html5\HTML5())->saveHTML($fragment);
    }
422547
public function doIndent($input)
    {
        $subject = $input;

        $output = '';

        $nextLineIndentationLevel = 0;

        do {
            $indentationLevel = $nextLineIndentationLevel;

            $patterns = $this->getTagPatterns();

            $rules = ['NO', 'DECREASE', 'INCREASE', 'DISCARD'];

            $match = [];

            foreach ($patterns as $pattern => $rule) {
                if ($match = preg_match($pattern, $subject, $matches)) {
                    $this->log[] = [
                        'rule' => $rules[$rule],
                        'pattern' => $pattern,
                        'subject' => $subject,
                        'match' => $matches[0],
                    ];

                    $subject = mb_substr($subject, mb_strlen($matches[0]));

                    if ($rule === static::MATCH_DISCARD) {
                        break;
                    }

                    if ($rule === static::MATCH_INDENT_NO) {
                    } else {
                        if ($rule === static::MATCH_INDENT_DECREASE) {
                            $nextLineIndentationLevel--;
                            $indentationLevel--;
                        } else {
                            $nextLineIndentationLevel++;
                        }
                    }

                    if ($indentationLevel < 0) {
                        $indentationLevel = 0;
                    }

                    $output .= str_repeat(
                        $this->options['indentation_character'],
                        $indentationLevel
                    ) . $matches[0] . "\n";

                    break;
                }
            }
        } while ($match);

        $interpretedInput = '';

        foreach ($this->log as $e) {
            $interpretedInput .= $e['match'];
        }

        if ($interpretedInput !== $input) {
            throw new \RuntimeException('Did not reproduce the exact input.');
        }

        $output = preg_replace('/(<(\w+)[^>]*>)\s*(<\/\2>)/', '\\1\\3', $output);

        return $output;
    }
321259
private function cleanVariable($input)
    {
        if (is_string($input)) {
            if ($this->shouldSanitizeInput) {
                return trim(strip_tags($input));
            } else {
                return trim($input);
            }
        } else {
            return $input;
        }
    }
191373
protected function parseInput(string $input)
	{
		$category = explode('|', $input);

		if (isset($category[0]) && trim($category[0]) != '') {
			$this->category_id = urldecode($category[0]);
		}

		if (isset($category[1]) && trim($category[1]) != '') {
			$this->category_name = urldecode($category[1]);
		}
	}
213773
protected function _createRow($input) {
		foreach ($input as $key => $value) {
			$temp = str_replace('"', '""', $value);
			$temp = preg_replace("=(\r\n|\r|\n)=", "\n", $temp);
			$input[$key] = $this->delimiter.$temp.$this->delimiter;
		}
		$output = implode($this->separator, $input).$this->linebreaks;
		return $output;
	}
1098762
private function prepare(string $input)
    {
        $this->input = str_replace(["\n\r", "\r"], "\n", $input);

        // Create new token stream
        $this->stream = new TokenStream();

        $this->cursor = 0;
        $this->line = 1;
        $this->lineOffset = 0;
        $this->end = strlen($this->input);
        $this->lastCharPos = $this->end - 1;

        $this->currentChar = '';
        $this->currentValue = '';
        $this->modeStartChar = '';
        $this->modeStartPosition = 0;
        $this->modeStartLine = 0;

        // Set the mode to "ALL"
        $this->setMode(self::MODE_ALL);
    }
241093
public function input($input) {
        if(isset($this->inputs->$input)) 
            return $this->inputs->$input;
        return null;
    }
812149
private function stringToUtf($input)
    {
        if (is_array($input)) {
            $temp = array();
            foreach ($input as $key => $value) {
                $temp[$this->stringToUtf($key)] = $this->stringToUtf($value);
            }
            $input = $temp;
        } elseif (is_string($input)) {
            $input = iconv('iso-8859-15', 'utf-8', $input);
        }

        return $input;
    }
503275
function highlightHTML( $input )
    {
        $input = str_replace( "<", "&lt;", $input );
        $input = str_replace( ">", "&gt;", $input );

        $input = preg_replace( "#&lt;(.*?)&gt;#m", "<font color='red'>&lt;$1&gt;</font>", $input );

        return $input;
    }
1202072
protected function scan( $input )
	{
		static $regex;
		if ( !isset( $regex ) )
		{
			$regex = sprintf( '/(%s)|%s/%s', implode( ')|(', $this->getCatchablePatterns() ), implode( '|', $this->getNonCatchablePatterns() ), $this->getModifiers() );
		}
		$flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;
		$matches = preg_split( $regex, $input, -1, $flags );
		foreach ( $matches as $match )
		{
			// Must remain before 'value' assignment since it can change content
			$type = $this->getType( $match[0] );
			$this->tokens[] = [
				'value' => $match[0],
				'type' => $type,
				'position' => $match[1],
			];
		}
	}
623389
public static function urlsafeB64Decode($input)
    {
        $remainder = strlen($input) % 4;

        if ($remainder) {
            $pad_length = 4 - $remainder;
            $input .= str_repeat('=', $pad_length);
        }

        return base64_decode(strtr($input, '-_', '+/'));
    }
793319
protected function filter($input): string
    {
        $input = parent::filter((string)$input);
        return preg_replace('/\s/', '', $input);
    }
1065363
private function parseFields($input)
    {
        if (is_array($input)) {
            return $input;
        }

        $fields = [];
        foreach (explode(' ', $input) as $value) {
            $elements = explode(':', $value);
            $name = $elements[0];
            if (strlen($name)) {
                $type = isset($elements[1]) ? $elements[1] : 'string';
                preg_match_all('/(.*)\((.*)\)/', $type, $matches);
                $type = isset($matches[1][0]) ? $matches[1][0] : $type;
                $length = isset($matches[2][0]) ? $matches[2][0] : null;

                $fields[$name] = ['fieldName' => $name, 'type' => $type, 'length' => $length];
            }
        }

        return $fields;
    }
994287
public static function kebabCase(string $input): string
    {
        $words = __::words(preg_replace("/['\x{2019}]/u", '', $input));

        return array_reduce(
            $words,
            function ($result, $word) use ($words) {
                $isFirst = __::first($words) === $word;

                return $result . (!$isFirst ? '-' : '') . __::toLower($word);
            },
            ''
        );
    }
496971
protected function makeFormRequest($input)
    {
        $this->callSilent(
            'create:form-request',
            [
                'model-name' => $input->modelName,
                '--class-name' => $input->formRequestName,
                '--with-auth' => $input->withAuth,
                '--resource-file' => $input->resourceFile,
                '--template-name' => $input->template,
                '--routes-prefix' => $this->option('routes-prefix'),
                '--form-request-directory' => $input->formRequestDirectory,
                '--force' => $input->force,
            ]
        );

        return $this;
    }
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();
    }
469944
public function encrypt($input)
    {
        if (! $input) {
            return $input;
        }

        $methods = $this->getEncryptionMethods();
        $method  = reset($methods);
        $mkey    = key($methods);

        if ('mcrypt' == $method) {
            $result = $this->encryptMcrypt($input);
        } elseif ('null' == $method) {
            $result = $input;
        } else {
            $result = $this->encryptOpenSsl($input, $method);
        }

        return ":$mkey:" . base64_encode($result);
    }