From a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 11 May 2015 15:02:33 +0200 Subject: Let composer manage its own files --- .../Component/Console/Input/StringInput.php | 83 ---------------------- 1 file changed, 83 deletions(-) delete mode 100644 Aufgabe06/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php (limited to 'Aufgabe06/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php') diff --git a/Aufgabe06/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php b/Aufgabe06/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php deleted file mode 100644 index 6537e27..0000000 --- a/Aufgabe06/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -/** - * StringInput represents an input provided as a string. - * - * Usage: - * - * $input = new StringInput('foo --bar="foobar"'); - * - * @author Fabien Potencier - * - * @api - */ -class StringInput extends ArgvInput -{ - const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input)); - - if (null !== $definition) { - $this->bind($definition); - } - } - - /** - * Tokenizes a string. - * - * @param string $input The input to tokenize - * - * @return array An array of tokens - * - * @throws \InvalidArgumentException When unable to parse input (should never happen) - */ - private function tokenize($input) - { - $tokens = array(); - $length = strlen($input); - $cursor = 0; - while ($cursor < $length) { - if (preg_match('/\s+/A', $input, $match, null, $cursor)) { - } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) { - $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2))); - } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) { - $tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2)); - } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { - $tokens[] = stripcslashes($match[1]); - } else { - // should never happen - throw new \InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); - } - - $cursor += strlen($match[0]); - } - - return $tokens; - } -} -- cgit v1.2.3-70-g09d2