public function __construct(array $argv = null, InputDefinition $definition = null) { if (null === $argv) { $argv = $_SERVER['argv']; } array_shift($argv); $this->tokens = $argv; parent::__construct($definition); }
/** * Constructor. * * @param array $argv An array of parameters from the CLI (in the argv format) * @param InputDefinition $definition A InputDefinition instance * * @api */ public function __construct(InputDefinition $definition = null, $removeOptions = false, $strict = false) { $argv = $_SERVER['argv']; // strip the application name array_shift($argv); // strip the command name $this->commandName = array_shift($argv); $this->tokens = $argv; $this->removeOptions = (bool) $removeOptions; $this->strict = (bool) $strict; parent::__construct($definition); }
/** * Constructor. * * @param array $parameters An array of parameters * @param InputDefinition $definition A InputDefinition instance */ public function __construct(array $parameters, InputDefinition $definition = null) { $this->parameters = $parameters; parent::__construct($definition); }