class Formatter (View source)

This Attribute is designed to be used with Console style commands, not Annotated Commands.

Methods

__construct(string|null $returnType = null, string|null $defaultFormatter = 'table')

No description

Details

__construct(string|null $returnType = null, string|null $defaultFormatter = 'table')

No description

Parameters

string|null $returnType

The command's return type, before formatting. Usually this is a class name like RowsOfFields::class.

string|null $defaultFormatter

The fallback formatter name. See the list at https://github.com/consolidation/output-formatters/blob/a112df9a74854c8438b33b334ed619fa43edf31a/src/FormatterManager.php#L43-L57