lucee.Componentcommandbox.system.util.Parser
Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com CommandBox Command Line Parser and Tokenizer
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
CR
|
true
|
false
|
Constructor Summary | |
---|---|
init()
constructor. |
Method Summary | |
---|---|
string
|
escapeArg([any argValue])
Escapes a value and for inclusion in a command. |
any
|
markExpressions(any argValue)
Find any strings encased in backticks and flags them as a CommandBox expression. |
any
|
markSystemSettings(any argValue)
Find any strings like ${foo} and flag them as a system setting. |
any
|
parseParameters(array parameters, [any commandParameters])
Parse an array of parameter tokens. |
any
|
removeEscapedChars([any theString])
|
any
|
replaceEscapedChars([any theString])
|
any
|
tokenizeInput([string line])
Tokenizes the command line entered by the user. |
any
|
unwrapQuotes([any theString])
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- CR@constantsserializable
- trueMethod Detail |
---|
Escapes a value and for inclusion in a command The following replacements are made: " --> \" ' --> \' ` --> \` = --> \= ; --> \; & --> \& | --> \| ${ --> \${
argValue
Find any strings encased in backticks and flags them as a CommandBox expression
argValue
Find any strings like ${foo} and flag them as a system setting
argValue
Parse an array of parameter tokens. unescape values and determine if named or positional params are being used.
parameters
commandParameters
theString
theString
Tokenizes the command line entered by the user. Returns array with command statements and arguments Consider making a dedicated CFC for this since some of the logic could benifit from little helper methods to increase readability and reduce duplicate code.
line
theString