ArgsRemapper
class ArgsRemapper (View source)
Map commandline arguments from one value to another during preflight.
Properties
protected | $remapOptions | ||
protected | $remapCommandAliases |
Methods
ArgsRemapper constructor
Given an $argv array, apply all remap operations on each item within it.
Check to see if the provided single arg needs to be remapped. If it does, then the remapping is performed.
No description
No description
Check to see if the provided single arg matches the candidate.
Details
__construct($remapOptions, $remapCommandAliases)
ArgsRemapper constructor
array
remap(array $argv)
Given an $argv array, apply all remap operations on each item within it.
protected string
checkRemap(string $arg, bool $sawCommand)
Check to see if the provided single arg needs to be remapped. If it does, then the remapping is performed.
protected
remapOptions($arg)
No description
protected
remapCommandAlias($arg)
No description
protected bool
matches(string $arg, string $candidate)
Check to see if the provided single arg matches the candidate.
If the candidate is --foo
, then we will match the exact string
--foo
, or the leading substring --foo=
, and nothing else.