CommandTester::execute()

int execute(array $input, array $options = array()) Executes the command. Available execution options: interactive: Sets the input interactive flag decorated: Sets the output decorated flag verbosity: Sets the output verbosity flag Parameters array $input An array of command arguments and options array $options An array of execution options Return Value int The command exit code

CommandTester::getDisplay()

string getDisplay(bool $normalize = false) Gets the display returned by the last execution of the command. Parameters bool $normalize Whether to normalize end of lines to \n or not Return Value string The display

CommandTester::getOutput()

OutputInterface getOutput() Gets the output instance used by the last execution of the command. Return Value OutputInterface The current output instance

Command::setProcessTitle()

Command setProcessTitle(string $title) Sets the process title of the command. This feature should be used only when creating a long process command, like a daemon. PHP 5.5+ or the proctitle PECL library is required Parameters string $title The process title Return Value Command The current instance

CommandNotFoundException

class CommandNotFoundException extends InvalidArgumentException implements ExceptionInterface Represents an incorrect command name typed in the console. Methods __construct(string $message, array $alternatives = array(), int $code, Exception $previous = null) array getAlternatives() Details __construct(string $message, array $alternatives = array(), int $code, Exception $previous = null) Parameters string $message Exception message to t

Command::setName()

Command setName(string $name) Sets the name of the command. This method can set both the namespace and the name if you separate them by a colon (:) $command->setName('foo:bar'); Parameters string $name The command name Return Value Command The current instance Exceptions InvalidArgumentException When the name is invalid

Command::setHelperSet()

setHelperSet(HelperSet $helperSet) Sets the helper set. Parameters HelperSet $helperSet A HelperSet instance

Command::setHelp()

Command setHelp(string $help) Sets the help for the command. Parameters string $help The help for the command Return Value Command The current instance

Command::setDefinition()

Command setDefinition(array|InputDefinition $definition) Sets an array of argument and option instances. Parameters array|InputDefinition $definition An array of argument and option instances or a definition instance Return Value Command The current instance

Command::setApplication()

setApplication(Application $application = null) Sets the application instance for this command. Parameters Application $application An Application instance