Consolidation\AnnotatedCommand
Namespaces
Classes
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.
The AnnotatedCommandFactory creates commands for your application.
Command cration listeners can be added to the annotation command factory. These will be notified whenever a new commandfile is provided to the factory. This is useful for initializing new commandfile objects.
Return a CommandError as the result of a command to pass a status code and error message to be displayed.
Do discovery presuming that the namespace of the command will contain the last component of the path. This is the convention that should be used when searching for command files that are bundled with the modules of a framework. The convention used is that the namespace for a module in a framework should start with the framework name followed by the module name.
Process a command, including hooks and other callbacks.
Return a CommandResult as the result of a command to pass both an exit code and result data from a command.
Prepare parameter list for execurion. Handle injection of any special values (e.g. $input and $output) into the parameter list.
Write the results of a command. Inject your ResultWriter into the CommandProcessor.
Interfaces
Command cration listeners can be added to the annotation command factory. These will be notified whenever a new commandfile is provided to the factory. This is useful for initializing new commandfile objects.
If an annotated command method encounters an error, then it should either throw an exception, or return a result object that implements ExitCodeInterface.
If an annotated command method returns an object that implements OutputDataInterface, then the getOutputData() method is used to fetch the output to print from the result object.
Provide an object for the specified interface or class name.