Methods Summary | ||
---|---|---|
public
|
||
public
|
||
public
|
#
setApplication( Symfony\Component\Console\Application $application = NULL )
Sets the application instance for this command.
|
|
public
|
||
public
|
||
public
|
||
public
|
||
protected
|
||
protected
|
#
execute( Symfony\Component\Console\Input\InputInterface $input , Symfony\Component\Console\Output\OutputInterface $output )
Executes the current command.
This method is not abstract because you can use this class
as a concrete class. In this case, instead of defining the
execute() method, you set the code to execute by passing
a Closure to the setCode() method.
seesetCode() |
|
protected
|
#
interact( Symfony\Component\Console\Input\InputInterface $input , Symfony\Component\Console\Output\OutputInterface $output )
Interacts with the user.
This method is executed before the InputDefinition is validated.
This means that this is the only place where the command can
interactively ask for values of missing required arguments.
|
|
protected
|
#
initialize( Symfony\Component\Console\Input\InputInterface $input , Symfony\Component\Console\Output\OutputInterface $output )
Initializes the command just after the input has been validated.
This is mainly useful when a lot of commands extends one main command
where some things need to be initialized based on the input arguments and options.
|
|
public
|
||
public
|
||
public
|
#
mergeApplicationDefinition( bool $mergeArgs = true )
Merges the application definition with the command definition.
This method is not part of public API and should not be used directly.
|
|
public
|
#
setDefinition( array|\InputDefinition $definition )
Sets an array of argument and option instances.
|
|
public
|
||
public
|
#
getNativeDefinition( )
Gets the InputDefinition to be used to create representations of this Command.
Can be overridden to provide the original command representation when it would otherwise
be changed by merging with the application InputDefinition.
This method is not part of public API and should not be used directly.
|
|
public
|
#
addArgument( string $name , int $mode = NULL, string $description = '', mixed $default = NULL )
Adds an argument.
|
|
public
|
||
public
|
||
public
|
#
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
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
getProcessedHelp( )
Returns the processed help for the command replacing the %command.name% and
%command.full_name% patterns with the real values dynamically.
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|