AnnotatedCommand
class AnnotatedCommand extends Command implements HelpDocumentAlter (View source)
AnnotatedCommands are created automatically by the AnnotatedCommandFactory. Each command method in a command file will produce one AnnotatedCommand. These are then added to your Symfony Console Application object; nothing else is needed.
Optionally, though, you may extend AnnotatedCommand directly to make a single command. The usage pattern is the same as for any other Symfony Console command, except that you may omit the 'Confiure' method, and instead place your annotations on the execute() method.
Properties
protected | $commandCallback | ||
protected | $completionCallback | ||
protected | $commandProcessor | ||
protected | $annotationData | ||
protected | $examples | ||
protected | $topics | ||
protected | $returnType | ||
protected | $injectedClasses | ||
protected | $parameterMap |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Returns all of the hook names that may be called for this command.
Add any options to this command that are defined by hook implementations
Route a completion request to the specified Callable if available.
No description
{@inheritdoc}
No description
{@inheritdoc}
This function is available for use by a class that may wish to extend this class rather than use annotations to define commands. Using this technique does allow for the use of annotations to define hooks.
No description
Inject $input and $output into the command instance if it is set up to receive them.
Details
__construct($name = null)
No description
setCommandCallback($commandCallback)
No description
setCompletionCallback($completionCallback)
No description
setCommandProcessor($commandProcessor)
No description
commandProcessor()
No description
getReturnType()
No description
setReturnType($returnType)
No description
getAnnotationData()
No description
setAnnotationData($annotationData)
No description
getTopics()
No description
setTopics($topics)
No description
setCommandInfo($commandInfo)
No description
getExampleUsages()
No description
addUsageOrExample($usage, $description)
No description
getCompletionCallback()
No description
helpAlter(DomDocument $originalDom)
No description
protected
setCommandArguments($commandInfo)
No description
protected
setCommandArgumentsFromParameters($commandInfo)
No description
protected
getCommandArgumentMode($hasDefault, $defaultValue)
No description
setCommandOptions($commandInfo, $automaticOptions = [])
No description
addOptions($inputOptions, $automaticOptions = [])
No description
static protected
inputOptionSetDescription($inputOption, $description)
deprecated
deprecated
No description
array
getNames()
Returns all of the hook names that may be called for this command.
optionsHook()
Add any options to this command that are defined by hook implementations
void
complete(CompletionInput $input, CompletionSuggestions $suggestions)
Route a completion request to the specified Callable if available.
optionsHookForHookAnnotations($commandInfoList)
No description
protected
interact(InputInterface $input, OutputInterface $output)
{@inheritdoc}
protected
initialize(InputInterface $input, OutputInterface $output)
No description
protected int
execute(InputInterface $input, OutputInterface $output)
{@inheritdoc}
processResults(InputInterface $input, OutputInterface $output, $results)
This function is available for use by a class that may wish to extend this class rather than use annotations to define commands. Using this technique does allow for the use of annotations to define hooks.
protected
createCommandData(InputInterface $input, OutputInterface $output)
No description
State
injectIntoCommandfileInstance(InputInterface $input, OutputInterface $output)
Inject $input and $output into the command instance if it is set up to receive them.