OutputFormat
: string
in package
Output format for a command.
The value can be queried in the __invoke method of a command.
#[AsCommand(
name: 'app:user:created',
supportsOutputFormat: true,
)
class CreateUserCommand {
public function __invoke(
#[Option(description: "The username of the user")] string $userId,
IOutput $output,
OutputFormat $outputFormat,
): ExitCode {
// ...
return ExitCode::Success;
}
}
Tags
Table of Contents
Cases
- Json = 'json'
- JsonPretty = 'json_pretty'
- Plain = 'plain'