TYPO3
7.6
|
Public Member Functions | |
__construct ($input, InputDefinition $definition=null) | |
Public Member Functions inherited from ArgvInput | |
__construct (array $argv=null, InputDefinition $definition=null) | |
getFirstArgument () | |
hasParameterOption ($values) | |
getParameterOption ($values, $default=false) | |
__toString () | |
Public Member Functions inherited from Input | |
__construct (InputDefinition $definition=null) | |
bind (InputDefinition $definition) | |
validate () | |
isInteractive () | |
setInteractive ($interactive) | |
getArguments () | |
getArgument ($name) | |
setArgument ($name, $value) | |
hasArgument ($name) | |
getOptions () | |
getOption ($name) | |
setOption ($name, $value) | |
hasOption ($name) | |
escapeToken ($token) | |
Public Attributes | |
const | REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)' |
const | REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')' |
Private Member Functions | |
tokenize ($input) | |
Additional Inherited Members | |
Protected Member Functions inherited from ArgvInput | |
setTokens (array $tokens) | |
parse () | |
Protected Attributes inherited from Input | |
$definition | |
$options = array() | |
$arguments = array() | |
$interactive = true | |
StringInput represents an input provided as a string.
Usage:
$input = new StringInput('foo --bar="foobar"');
Definition at line 25 of file StringInput.php.
__construct | ( | $input, | |
InputDefinition | $definition = null |
||
) |
Constructor.
string | $input | An array of parameters from the CLI (in the argv format) |
InputDefinition | $definition | A InputDefinition instance |
Definition at line 40 of file StringInput.php.
References Input\$definition, Input\bind(), ArgvInput\setTokens(), and StringInput\tokenize().
|
private |
Tokenizes a string.
string | $input | The input to tokenize |
\InvalidArgumentException | When unable to parse input (should never happen) |
Definition at line 64 of file StringInput.php.
References ArgvInput\$tokens, and elseif.
Referenced by StringInput\__construct().
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')' |
Definition at line 28 of file StringInput.php.
const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)' |
Definition at line 27 of file StringInput.php.