## Table of contents - [\Consolidation\OutputFormatters\FormatterManager](#class-consolidationoutputformattersformattermanager) - [\Consolidation\OutputFormatters\Exception\AbstractDataFormatException (abstract)](#class-consolidationoutputformattersexceptionabstractdataformatexception-abstract) - [\Consolidation\OutputFormatters\Exception\IncompatibleDataException](#class-consolidationoutputformattersexceptionincompatibledataexception) - [\Consolidation\OutputFormatters\Exception\InvalidFormatException](#class-consolidationoutputformattersexceptioninvalidformatexception) - [\Consolidation\OutputFormatters\Exception\UnknownFieldException](#class-consolidationoutputformattersexceptionunknownfieldexception) - [\Consolidation\OutputFormatters\Exception\UnknownFormatException](#class-consolidationoutputformattersexceptionunknownformatexception) - [\Consolidation\OutputFormatters\Formatters\CsvFormatter](#class-consolidationoutputformattersformatterscsvformatter) - [\Consolidation\OutputFormatters\Formatters\FormatterInterface (interface)](#interface-consolidationoutputformattersformattersformatterinterface) - [\Consolidation\OutputFormatters\Formatters\JsonFormatter](#class-consolidationoutputformattersformattersjsonformatter) - [\Consolidation\OutputFormatters\Formatters\ListFormatter](#class-consolidationoutputformattersformatterslistformatter) - [\Consolidation\OutputFormatters\Formatters\PrintRFormatter](#class-consolidationoutputformattersformattersprintrformatter) - [\Consolidation\OutputFormatters\Formatters\RenderDataInterface (interface)](#interface-consolidationoutputformattersformattersrenderdatainterface) - [\Consolidation\OutputFormatters\Formatters\SectionsFormatter](#class-consolidationoutputformattersformatterssectionsformatter) - [\Consolidation\OutputFormatters\Formatters\SerializeFormatter](#class-consolidationoutputformattersformattersserializeformatter) - [\Consolidation\OutputFormatters\Formatters\StringFormatter](#class-consolidationoutputformattersformattersstringformatter) - [\Consolidation\OutputFormatters\Formatters\TableFormatter](#class-consolidationoutputformattersformatterstableformatter) - [\Consolidation\OutputFormatters\Formatters\TsvFormatter](#class-consolidationoutputformattersformatterstsvformatter) - [\Consolidation\OutputFormatters\Formatters\VarExportFormatter](#class-consolidationoutputformattersformattersvarexportformatter) - [\Consolidation\OutputFormatters\Formatters\XmlFormatter](#class-consolidationoutputformattersformattersxmlformatter) - [\Consolidation\OutputFormatters\Formatters\YamlFormatter](#class-consolidationoutputformattersformattersyamlformatter) - [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) - [\Consolidation\OutputFormatters\Options\OverrideOptionsInterface (interface)](#interface-consolidationoutputformattersoptionsoverrideoptionsinterface) - [\Consolidation\OutputFormatters\StructuredData\AbstractStructuredList (abstract)](#class-consolidationoutputformattersstructureddataabstractstructuredlist-abstract) - [\Consolidation\OutputFormatters\StructuredData\AssociativeList](#class-consolidationoutputformattersstructureddataassociativelist) - [\Consolidation\OutputFormatters\StructuredData\CallableRenderer](#class-consolidationoutputformattersstructureddatacallablerenderer) - [\Consolidation\OutputFormatters\StructuredData\HelpDocument](#class-consolidationoutputformattersstructureddatahelpdocument) - [\Consolidation\OutputFormatters\StructuredData\ListDataInterface (interface)](#interface-consolidationoutputformattersstructureddatalistdatainterface) - [\Consolidation\OutputFormatters\StructuredData\OriginalDataInterface (interface)](#interface-consolidationoutputformattersstructureddataoriginaldatainterface) - [\Consolidation\OutputFormatters\StructuredData\PropertyList](#class-consolidationoutputformattersstructureddatapropertylist) - [\Consolidation\OutputFormatters\StructuredData\RenderCellCollectionInterface (interface)](#interface-consolidationoutputformattersstructureddatarendercellcollectioninterface) - [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface (interface)](#interface-consolidationoutputformattersstructureddatarendercellinterface) - [\Consolidation\OutputFormatters\StructuredData\RestructureInterface (interface)](#interface-consolidationoutputformattersstructureddatarestructureinterface) - [\Consolidation\OutputFormatters\StructuredData\RowsOfFields](#class-consolidationoutputformattersstructureddatarowsoffields) - [\Consolidation\OutputFormatters\StructuredData\TableDataInterface (interface)](#interface-consolidationoutputformattersstructureddatatabledatainterface) - [\Consolidation\OutputFormatters\StructuredData\Xml\DomDataInterface (interface)](#interface-consolidationoutputformattersstructureddataxmldomdatainterface) - [\Consolidation\OutputFormatters\StructuredData\Xml\XmlSchema](#class-consolidationoutputformattersstructureddataxmlxmlschema) - [\Consolidation\OutputFormatters\StructuredData\Xml\XmlSchemaInterface (interface)](#interface-consolidationoutputformattersstructureddataxmlxmlschemainterface) - [\Consolidation\OutputFormatters\Transformations\DomToArraySimplifier](#class-consolidationoutputformatterstransformationsdomtoarraysimplifier) - [\Consolidation\OutputFormatters\Transformations\OverrideRestructureInterface (interface)](#interface-consolidationoutputformatterstransformationsoverriderestructureinterface) - [\Consolidation\OutputFormatters\Transformations\PropertyListTableTransformation](#class-consolidationoutputformatterstransformationspropertylisttabletransformation) - [\Consolidation\OutputFormatters\Transformations\PropertyParser](#class-consolidationoutputformatterstransformationspropertyparser) - [\Consolidation\OutputFormatters\Transformations\ReorderFields](#class-consolidationoutputformatterstransformationsreorderfields) - [\Consolidation\OutputFormatters\Transformations\SimplifyToArrayInterface (interface)](#interface-consolidationoutputformatterstransformationssimplifytoarrayinterface) - [\Consolidation\OutputFormatters\Transformations\TableTransformation](#class-consolidationoutputformatterstransformationstabletransformation) - [\Consolidation\OutputFormatters\Transformations\WordWrapper](#class-consolidationoutputformatterstransformationswordwrapper) - [\Consolidation\OutputFormatters\Transformations\Wrap\CalculateWidths](#class-consolidationoutputformatterstransformationswrapcalculatewidths) - [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) - [\Consolidation\OutputFormatters\Validate\ValidationInterface (interface)](#interface-consolidationoutputformattersvalidatevalidationinterface) - [\Consolidation\OutputFormatters\Validate\ValidDataTypesInterface (interface)](#interface-consolidationoutputformattersvalidatevaliddatatypesinterface)
### Class: \Consolidation\OutputFormatters\FormatterManager > Manage a collection of formatters; return one on request. | Visibility | Function | |:-----------|:---------| | public | __construct() : void | | public | addDefaultFormatters() : void | | public | addDefaultSimplifiers() : void | | public | addFormatter(string $key, string/[\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter) : [\Consolidation\OutputFormatters\FormatterManager](#class-consolidationoutputformattersformattermanager)
Add a formatter | | public | addSimplifier([\Consolidation\OutputFormatters\Transformations\SimplifyToArrayInterface](#interface-consolidationoutputformatterstransformationssimplifytoarrayinterface) $simplifier) : [\Consolidation\OutputFormatters\FormatterManager](#class-consolidationoutputformattersformattermanager)
Add a simplifier | | public | automaticOptions([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options, mixed $dataType) : \Symfony\Component\Console\Input\InputOption[]
Return a set of InputOption based on the annotations of a command. | | public | getFormatter(string $format) : [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)
Fetch the requested formatter. | | public | hasFormatter(mixed $format) : bool
Test to see if the stipulated format exists | | public | isValidDataType([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, [\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool | | public | isValidFormat([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $dataType) : bool | | public | overrideOptions([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Allow the formatter to mess with the configuration options before any transformations et. al. get underway. | | public | overrideRestructure([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Allow the formatter access to the raw structured data prior to restructuring. For example, the 'list' formatter may wish to display the row keys when provided table output. If this function returns a result that does not evaluate to 'false', then that result will be used as-is, and restructuring and validation will not occur. | | public | renderData([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Render the data as necessary (e.g. to select or reorder fields). | | public | restructureData(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Restructure the data as necessary (e.g. to select or reorder fields). | | public | validFormats(mixed $dataType) : array
Return the identifiers for all valid data types that have been registered. | | public | validateData([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Determine if the provided data is compatible with the formatter being used. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, string $format, mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void
Format and write output | | protected | availableFieldsList(mixed $availableFields) : string[]
Given a list of available fields, return a list of field descriptions. | | protected | canSimplifyToArray([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $structuredOutput) : bool | | protected | simplifyToArray(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | | protected | validateAndRestructure([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void |
### Class: \Consolidation\OutputFormatters\Exception\AbstractDataFormatException (abstract) > Contains some helper functions used by exceptions in this project. | Visibility | Function | |:-----------|:---------| | protected static | describeAllowedTypes(mixed $allowedTypes) : void | | protected static | describeDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $data) : string
Return a description of the data type represented by the provided parameter. \ArrayObject is used as a proxy to mean an array primitive (or an ArrayObject). | | protected static | describeListOfAllowedTypes(mixed $allowedTypes) : void | *This class extends \Exception*
### Class: \Consolidation\OutputFormatters\Exception\IncompatibleDataException > Represents an incompatibility between the output data and selected formatter. | Visibility | Function | |:-----------|:---------| | public | __construct([\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface) $formatter, mixed $data, mixed $allowedTypes) : void | *This class extends [\Consolidation\OutputFormatters\Exception\AbstractDataFormatException](#class-consolidationoutputformattersexceptionabstractdataformatexception-abstract)*
### Class: \Consolidation\OutputFormatters\Exception\InvalidFormatException > Represents an incompatibility between the output data and selected formatter. | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $format, mixed $data, mixed $validFormats) : void | *This class extends [\Consolidation\OutputFormatters\Exception\AbstractDataFormatException](#class-consolidationoutputformattersexceptionabstractdataformatexception-abstract)*
### Class: \Consolidation\OutputFormatters\Exception\UnknownFieldException > Indicates that the requested format does not exist. | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $field) : void | *This class extends \Exception*
### Class: \Consolidation\OutputFormatters\Exception\UnknownFormatException > Indicates that the requested format does not exist. | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $format) : void | *This class extends \Exception*
### Class: \Consolidation\OutputFormatters\Formatters\CsvFormatter > Comma-separated value formatters Display the provided structured data in a comma-separated list. If there are multiple records provided, then they will be printed one per line. The primary data types accepted are RowsOfFields and PropertyList. The later behaves exactly like the former, save for the fact that it contains but a single row. This formmatter can also accept a PHP array; this is also interpreted as a single-row of data with no header. | Visibility | Function | |:-----------|:---------| | public | isValidDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool
Return the list of data types acceptable to this formatter | | public | renderData(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Convert the contents of the output data just before it is to be printed, prior to output but after restructuring and validation. | | public | validDataTypes() : void | | public | validate(mixed $structuredData) : void | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | | protected | csvEscape(mixed $data, string $delimiter=`','`) : void | | protected | getDefaultFormatterOptions() : array
Return default values for formatter options | | protected | renderEachCell(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | | protected | writeOneLine(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, mixed $options) : void | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface), [\Consolidation\OutputFormatters\Validate\ValidDataTypesInterface](#interface-consolidationoutputformattersvalidatevaliddatatypesinterface), [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface), [\Consolidation\OutputFormatters\Formatters\RenderDataInterface](#interface-consolidationoutputformattersformattersrenderdatainterface)*
### Interface: \Consolidation\OutputFormatters\Formatters\FormatterInterface | Visibility | Function | |:-----------|:---------| | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. |
### Class: \Consolidation\OutputFormatters\Formatters\JsonFormatter > Json formatter Convert an array or ArrayObject into Json. | Visibility | Function | |:-----------|:---------| | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)*
### Class: \Consolidation\OutputFormatters\Formatters\ListFormatter > Display the data in a simple list. This formatter prints a plain, unadorned list of data, with each data item appearing on a separate line. If you wish your list to contain headers, then use the table formatter, and wrap your data in an PropertyList. | Visibility | Function | |:-----------|:---------| | public | overrideRestructure(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Select data to use directly from the structured output, before the restructure operation has been executed. | | public | renderData(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Convert the contents of the output data just before it is to be printed, prior to output but after restructuring and validation. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | | protected | renderEachCell(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface), [\Consolidation\OutputFormatters\Transformations\OverrideRestructureInterface](#interface-consolidationoutputformatterstransformationsoverriderestructureinterface), [\Consolidation\OutputFormatters\Formatters\RenderDataInterface](#interface-consolidationoutputformattersformattersrenderdatainterface)*
### Class: \Consolidation\OutputFormatters\Formatters\PrintRFormatter > Print_r formatter Run provided date thruogh print_r. | Visibility | Function | |:-----------|:---------| | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)*
### Interface: \Consolidation\OutputFormatters\Formatters\RenderDataInterface | Visibility | Function | |:-----------|:---------| | public | renderData(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Convert the contents of the output data just before it is to be printed, prior to output but after restructuring and validation. |
### Class: \Consolidation\OutputFormatters\Formatters\SectionsFormatter > Display sections of data. This formatter takes data in the RowsOfFields data type. Each row represents one section; the data in each section is rendered in two columns, with the key in the first column and the value in the second column. | Visibility | Function | |:-----------|:---------| | public | isValidDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool
Return the list of data types acceptable to this formatter | | public | renderData(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Convert the contents of the output data just before it is to be printed, prior to output but after restructuring and validation. | | public | validDataTypes() : void | | public | validate(mixed $structuredData) : mixed
Throw an IncompatibleDataException if the provided data cannot be processed by this formatter. Return the source data if it is valid. The data may be encapsulated or converted if necessary. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | | protected | renderEachCell(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface), [\Consolidation\OutputFormatters\Validate\ValidDataTypesInterface](#interface-consolidationoutputformattersvalidatevaliddatatypesinterface), [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface), [\Consolidation\OutputFormatters\Formatters\RenderDataInterface](#interface-consolidationoutputformattersformattersrenderdatainterface)*
### Class: \Consolidation\OutputFormatters\Formatters\SerializeFormatter > Serialize formatter Run provided date thruogh serialize. | Visibility | Function | |:-----------|:---------| | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)*
### Class: \Consolidation\OutputFormatters\Formatters\StringFormatter > String formatter This formatter is used as the default action when no particular formatter is requested. It will print the provided data only if it is a string; if any other type is given, then nothing is printed. | Visibility | Function | |:-----------|:---------| | public | isValidDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool
All data types are acceptable. | | public | overrideOptions(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Allow the formatter to mess with the configuration options before any transformations et. al. get underway. | | public | validate(mixed $structuredData) : void
Always validate any data, though. This format will never cause an error if it is selected for an incompatible data type; at worse, it simply does not print any data. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | | protected | reduceToSigleFieldAndWrite(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void
If the data provided to a 'string' formatter is a table, then try to emit it as a TSV value. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface), [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface), [\Consolidation\OutputFormatters\Options\OverrideOptionsInterface](#interface-consolidationoutputformattersoptionsoverrideoptionsinterface)*
### Class: \Consolidation\OutputFormatters\Formatters\TableFormatter > Display a table of data with the Symfony Table class. This formatter takes data of either the RowsOfFields or PropertyList data type. Tables can be rendered with the rows running either vertically (the normal orientation) or horizontally. By default, associative lists will be displayed as two columns, with the key in the first column and the value in the second column. | Visibility | Function | |:-----------|:---------| | public | __construct() : void | | public | isValidDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool
Return the list of data types acceptable to this formatter | | public | renderData(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Convert the contents of the output data just before it is to be printed, prior to output but after restructuring and validation. | | public | validDataTypes() : void | | public | validate(mixed $structuredData) : mixed
Throw an IncompatibleDataException if the provided data cannot be processed by this formatter. Return the source data if it is valid. The data may be encapsulated or converted if necessary. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | | protected static | addCustomTableStyles(mixed $table) : void
Add our custom table style(s) to the table. | | protected | renderEachCell(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | | protected | wrap(mixed $headers, array $data, \Symfony\Component\Console\Helper\TableStyle $tableStyle, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : array
Wrap the table data | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface), [\Consolidation\OutputFormatters\Validate\ValidDataTypesInterface](#interface-consolidationoutputformattersvalidatevaliddatatypesinterface), [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface), [\Consolidation\OutputFormatters\Formatters\RenderDataInterface](#interface-consolidationoutputformattersformattersrenderdatainterface)*
### Class: \Consolidation\OutputFormatters\Formatters\TsvFormatter > Tab-separated value formatters Display the provided structured data in a tab-separated list. Output escaping is much lighter, since there is no allowance for altering the delimiter. | Visibility | Function | |:-----------|:---------| | public | renderData(mixed $originalData, mixed $restructuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Convert the contents of the output data just before it is to be printed, prior to output but after restructuring and validation. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | | protected | getDefaultFormatterOptions() : mixed | | protected | tsvEscape(mixed $data) : void | | protected | writeOneLine(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, mixed $options) : void | *This class extends [\Consolidation\OutputFormatters\Formatters\CsvFormatter](#class-consolidationoutputformattersformatterscsvformatter)* *This class implements [\Consolidation\OutputFormatters\Formatters\RenderDataInterface](#interface-consolidationoutputformattersformattersrenderdatainterface), [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface), [\Consolidation\OutputFormatters\Validate\ValidDataTypesInterface](#interface-consolidationoutputformattersvalidatevaliddatatypesinterface), [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)*
### Class: \Consolidation\OutputFormatters\Formatters\VarExportFormatter > Var_export formatter Run provided date thruogh var_export. | Visibility | Function | |:-----------|:---------| | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)*
### Class: \Consolidation\OutputFormatters\Formatters\XmlFormatter > Display a table of data with the Symfony Table class. This formatter takes data of either the RowsOfFields or PropertyList data type. Tables can be rendered with the rows running either vertically (the normal orientation) or horizontally. By default, associative lists will be displayed as two columns, with the key in the first column and the value in the second column. | Visibility | Function | |:-----------|:---------| | public | __construct() : void | | public | isValidDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool
Return the list of data types acceptable to this formatter | | public | validDataTypes() : void | | public | validate(mixed $structuredData) : mixed
Throw an IncompatibleDataException if the provided data cannot be processed by this formatter. Return the source data if it is valid. The data may be encapsulated or converted if necessary. | | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface), [\Consolidation\OutputFormatters\Validate\ValidDataTypesInterface](#interface-consolidationoutputformattersvalidatevaliddatatypesinterface), [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface)*
### Class: \Consolidation\OutputFormatters\Formatters\YamlFormatter > Yaml formatter Convert an array or ArrayObject into Yaml. | Visibility | Function | |:-----------|:---------| | public | write(\Symfony\Component\Console\Output\OutputInterface $output, mixed $data, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : string
Given structured data, apply appropriate formatting, and return a printable string. | *This class implements [\Consolidation\OutputFormatters\Formatters\FormatterInterface](#interface-consolidationoutputformattersformattersformatterinterface)*
### Class: \Consolidation\OutputFormatters\Options\FormatterOptions > FormetterOptions holds information that affects the way a formatter renders its output. There are three places where a formatter might get options from: 1. Configuration associated with the command that produced the output. This is passed in to FormatterManager::write() along with the data to format. It might originally come from annotations on the command, or it might come from another source. Examples include the field labels for a table, or the default list of fields to display. 2. Options specified by the user, e.g. by commandline options. 3. Default values associated with the formatter itself. This class caches configuration from sources (1) and (2), and expects to be provided the defaults, (3), whenever a value is requested. | Visibility | Function | |:-----------|:---------| | public | __construct(array $configurationData=array(), array $options=array()) : void
Create a new FormatterOptions with the configuration data and the user-specified options for this request. | | public | get(string $key, array $defaults=array(), bool/mixed $default=false) : mixed
Get a formatter option | | public | getConfigurationData() : array
Return a reference to the configuration data for this object. | | public | getFormat(array $defaults=array()) : string
Determine the format that was requested by the caller. | | public | getInputOptions(array $defaults) : array
Return all of the options from the provided $defaults array that exist in our InputInterface object. | | public | getOptions() : array
Return a reference to the user-specified options for this request. | | public | getXmlSchema() : [\Consolidation\OutputFormatters\StructuredData\Xml\XmlSchema](#class-consolidationoutputformattersstructureddataxmlxmlschema)
Return the XmlSchema to use with --format=xml for data types that support that. This is used when an array needs to be converted into xml. | | public | override(array $configurationData) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Create a new FormatterOptions object with new configuration data (provided), and the same options data as this instance. | | public | parsePropertyList(string $value) : array
Convert from a textual list to an array | | public | setConfigurationData(array $configurationData) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Change the configuration data for this formatter options object. | | public | setConfigurationDefault(string $key, mixed $value) : \Consolidation\OutputFormatters\Options\FormetterOptions
Change one configuration value for this formatter option, but only if it does not already have a value set. | | public | setDefaultFields(mixed $fields) : void | | public | setDefaultStringField(mixed $defaultStringField) : void | | public | setDelimiter(mixed $delimiter) : void | | public | setFieldLabels(mixed $fieldLabels) : void | | public | setIncludeFieldLables(mixed $includFieldLables) : void | | public | setInput(\Symfony\Component\Console\Input\InputInterface $input) : \Consolidation\OutputFormatters\Options\type
Provide a Symfony Console InputInterface containing the user-specified options for this request. | | public | setListDelimiter(mixed $listDelimiter) : void | | public | setListOrientation(mixed $listOrientation) : void | | public | setOption(string $key, mixed $value) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Change one option value specified by the user for this request. | | public | setOptions(array $options) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Set all of the options that were specified by the user for this request. | | public | setRowLabels(mixed $rowLabels) : void | | public | setTableStyle(mixed $style) : void | | public | setWidth(mixed $width) : void | | protected | defaultsForKey(string $key, array $defaults, bool $default=false) : array
Reduce provided defaults to the single item identified by '$key', if it exists, or an empty array otherwise. | | protected | fetch(string $key, array $defaults=array(), bool/mixed $default=false) : mixed
Look up a key, and return its raw value. | | protected | fetchRawValues(array $defaults=array()) : array
Look up all of the items associated with the provided defaults. | | protected | getOptionFormat(string $key) : string
Given a specific key, return the class method name of the parsing method for data stored under this key. | | protected | parse(string $key, mixed $value) : mixed
Given the raw value for a specific key, do any type conversion (e.g. from a textual list to an array) needed for the data. | | protected | setConfigurationValue(string $key, mixed $value) : \Consolidation\OutputFormatters\Options\FormetterOptions
Change one configuration value for this formatter option. |
### Interface: \Consolidation\OutputFormatters\Options\OverrideOptionsInterface | Visibility | Function | |:-----------|:---------| | public | overrideOptions(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions)
Allow the formatter to mess with the configuration options before any transformations et. al. get underway. |
### Class: \Consolidation\OutputFormatters\StructuredData\AbstractStructuredList (abstract) > Holds an array where each element of the array is one row, and each row contains an associative array where the keys are the field names, and the values are the field data. It is presumed that every row contains the same keys. | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $data) : void | | public | addRenderer([\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface) $renderer, string $priority=`'normal'`) : \Consolidation\OutputFormatters\StructuredData\$this
Add a renderer | | public | addRendererFunction(\callable $rendererFn, string $priority=`'normal'`) : \Consolidation\OutputFormatters\StructuredData\$this
Add a callable as a renderer | | public | abstract getListData([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed | | public | renderCell(mixed $key, mixed $cellData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options, mixed $rowData) : void | | public | abstract restructure([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | | protected | createTableTransformation(mixed $data, mixed $options) : mixed | | protected | defaultOptions() : array
A structured list may provide its own set of default options. These will be used in place of the command's default options (from the annotations) in instances where the user does not provide the options explicitly (on the commandline) or implicitly (via a configuration file). | | protected | getFields(mixed $options, mixed $defaults) : mixed | | protected | getReorderedFieldLabels(mixed $data, mixed $options, mixed $defaults) : mixed | | protected | instantiateTableTransformation(mixed $data, mixed $fieldLabels, mixed $rowLabels) : void | *This class extends \ArrayObject* *This class implements \Countable, \Serializable, \ArrayAccess, \Traversable, \IteratorAggregate, [\Consolidation\OutputFormatters\StructuredData\RestructureInterface](#interface-consolidationoutputformattersstructureddatarestructureinterface), [\Consolidation\OutputFormatters\StructuredData\ListDataInterface](#interface-consolidationoutputformattersstructureddatalistdatainterface), [\Consolidation\OutputFormatters\StructuredData\RenderCellCollectionInterface](#interface-consolidationoutputformattersstructureddatarendercellcollectioninterface), [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface)*
### Class: \Consolidation\OutputFormatters\StructuredData\AssociativeList > Old name for PropertyList class. | Visibility | Function | |:-----------|:---------| *This class extends [\Consolidation\OutputFormatters\StructuredData\PropertyList](#class-consolidationoutputformattersstructureddatapropertylist)* *This class implements \Countable, \Serializable, \ArrayAccess, \Traversable, \IteratorAggregate, [\Consolidation\OutputFormatters\StructuredData\RestructureInterface](#interface-consolidationoutputformattersstructureddatarestructureinterface), [\Consolidation\OutputFormatters\StructuredData\ListDataInterface](#interface-consolidationoutputformattersstructureddatalistdatainterface), [\Consolidation\OutputFormatters\StructuredData\RenderCellCollectionInterface](#interface-consolidationoutputformattersstructureddatarendercellcollectioninterface), [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface)*
### Class: \Consolidation\OutputFormatters\StructuredData\CallableRenderer | Visibility | Function | |:-----------|:---------| | public | __construct(\callable $renderFunction) : void | | public | renderCell(mixed $key, mixed $cellData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options, mixed $rowData) : void | *This class implements [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface)*
### Class: \Consolidation\OutputFormatters\StructuredData\HelpDocument | Visibility | Function | |:-----------|:---------| | public | getDomData() : [\DomDocument](http://php.net/manual/en/class.domdocument.php)
Convert data into a \DomDocument. | *This class implements [\Consolidation\OutputFormatters\StructuredData\Xml\DomDataInterface](#interface-consolidationoutputformattersstructureddataxmldomdatainterface)*
### Interface: \Consolidation\OutputFormatters\StructuredData\ListDataInterface | Visibility | Function | |:-----------|:---------| | public | getListData([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : array
Convert data to a format suitable for use in a list. By default, the array values will be used. Implement ListDataInterface to use some other criteria (e.g. array keys). |
### Interface: \Consolidation\OutputFormatters\StructuredData\OriginalDataInterface | Visibility | Function | |:-----------|:---------| | public | getOriginalData() : mixed
Return the original data for this table. Used by any formatter that expects an array. |
### Class: \Consolidation\OutputFormatters\StructuredData\PropertyList > Holds an array where each element of the array is one key : value pair. The keys must be unique, as is typically the case for associative arrays. | Visibility | Function | |:-----------|:---------| | public | getListData([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed | | public | restructure([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : \Consolidation\OutputFormatters\StructuredData\Consolidation\OutputFormatters\Transformations\TableTransformation
Restructure this data for output by converting it into a table transformation object. | | protected | defaultOptions() : void | | protected | instantiateTableTransformation(mixed $data, mixed $fieldLabels, mixed $rowLabels) : void | *This class extends [\Consolidation\OutputFormatters\StructuredData\AbstractStructuredList](#class-consolidationoutputformattersstructureddataabstractstructuredlist-abstract)* *This class implements [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface), [\Consolidation\OutputFormatters\StructuredData\RenderCellCollectionInterface](#interface-consolidationoutputformattersstructureddatarendercellcollectioninterface), [\Consolidation\OutputFormatters\StructuredData\ListDataInterface](#interface-consolidationoutputformattersstructureddatalistdatainterface), [\Consolidation\OutputFormatters\StructuredData\RestructureInterface](#interface-consolidationoutputformattersstructureddatarestructureinterface), \IteratorAggregate, \Traversable, \ArrayAccess, \Serializable, \Countable*
### Interface: \Consolidation\OutputFormatters\StructuredData\RenderCellCollectionInterface | Visibility | Function | |:-----------|:---------| | public | addRenderer([\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface) $renderer) : \Consolidation\OutputFormatters\StructuredData\$this
Add a renderer | *This class implements [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface)*
### Interface: \Consolidation\OutputFormatters\StructuredData\RenderCellInterface | Visibility | Function | |:-----------|:---------| | public | renderCell(string $key, mixed $cellData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options, array $rowData) : mixed
Convert the contents of one table cell into a string, so that it may be placed in the table. Renderer should return the $cellData passed to it if it does not wish to process it. |
### Interface: \Consolidation\OutputFormatters\StructuredData\RestructureInterface | Visibility | Function | |:-----------|:---------| | public | restructure([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void
Allow structured data to be restructured -- i.e. to select fields to show, reorder fields, etc. |
### Class: \Consolidation\OutputFormatters\StructuredData\RowsOfFields > Holds an array where each element of the array is one row, and each row contains an associative array where the keys are the field names, and the values are the field data. It is presumed that every row contains the same keys. | Visibility | Function | |:-----------|:---------| | public | getListData([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed | | public | restructure([\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : \Consolidation\OutputFormatters\StructuredData\Consolidation\OutputFormatters\Transformations\TableTransformation
Restructure this data for output by converting it into a table transformation object. | | protected | defaultOptions() : void | *This class extends [\Consolidation\OutputFormatters\StructuredData\AbstractStructuredList](#class-consolidationoutputformattersstructureddataabstractstructuredlist-abstract)* *This class implements [\Consolidation\OutputFormatters\StructuredData\RenderCellInterface](#interface-consolidationoutputformattersstructureddatarendercellinterface), [\Consolidation\OutputFormatters\StructuredData\RenderCellCollectionInterface](#interface-consolidationoutputformattersstructureddatarendercellcollectioninterface), [\Consolidation\OutputFormatters\StructuredData\ListDataInterface](#interface-consolidationoutputformattersstructureddatalistdatainterface), [\Consolidation\OutputFormatters\StructuredData\RestructureInterface](#interface-consolidationoutputformattersstructureddatarestructureinterface), \IteratorAggregate, \Traversable, \ArrayAccess, \Serializable, \Countable*
### Interface: \Consolidation\OutputFormatters\StructuredData\TableDataInterface | Visibility | Function | |:-----------|:---------| | public | getOriginalData() : mixed
Return the original data for this table. Used by any formatter that is -not- a table. | | public | getTableData(bool/boolean $includeRowKey=false) : array
Convert structured data into a form suitable for use by the table formatter. key from each row. |
### Interface: \Consolidation\OutputFormatters\StructuredData\Xml\DomDataInterface | Visibility | Function | |:-----------|:---------| | public | getDomData() : [\DomDocument](http://php.net/manual/en/class.domdocument.php)
Convert data into a \DomDocument. |
### Class: \Consolidation\OutputFormatters\StructuredData\Xml\XmlSchema | Visibility | Function | |:-----------|:---------| | public | __construct(array $elementList=array()) : void | | public | arrayToXML(mixed $structuredData) : void | | protected | addXmlChildren([\DOMDocument](http://php.net/manual/en/class.domdocument.php) $dom, mixed $xmlParent, mixed $elementName, mixed $structuredData) : void | | protected | addXmlData([\DOMDocument](http://php.net/manual/en/class.domdocument.php) $dom, mixed $xmlParent, mixed $elementName, mixed $structuredData) : void | | protected | addXmlDataOrAttribute([\DOMDocument](http://php.net/manual/en/class.domdocument.php) $dom, mixed $xmlParent, mixed $elementName, mixed $key, mixed $value) : void | | protected | determineElementName(mixed $key, mixed $childElementName, mixed $value) : void | | protected | getDefaultElementName(mixed $parentElementName) : mixed | | protected | getTopLevelElementName(mixed $structuredData) : mixed | | protected | inElementList(mixed $parentElementName, mixed $elementName) : void | | protected | isAssoc(mixed $data) : bool | | protected | isAttribute(mixed $parentElementName, mixed $elementName, mixed $value) : bool | | protected | singularForm(mixed $name) : void | *This class implements [\Consolidation\OutputFormatters\StructuredData\Xml\XmlSchemaInterface](#interface-consolidationoutputformattersstructureddataxmlxmlschemainterface)*
### Interface: \Consolidation\OutputFormatters\StructuredData\Xml\XmlSchemaInterface > When using arrays, we could represent XML data in a number of different ways. For example, given the following XML data strucutre: blah a b c This could be: [ 'id' => 1, 'name' => 'doc', 'foobars' => [ [ 'id' => '123', 'name' => 'blah', 'widgets' => [ [ 'foo' => 'a', 'bar' => 'b', 'baz' => 'c', ] ], ], ] ] The challenge is more in going from an array back to the more structured xml format. Note that any given key => string mapping could represent either an attribute, or a simple XML element containing only a string value. In general, we do *not* want to add extra layers of nesting in the data structure to disambiguate between these kinds of data, as we want the source data to render cleanly into other formats, e.g. yaml, json, et. al., and we do not want to force every data provider to have to consider the optimal xml schema for their data. Our strategy, therefore, is to expect clients that wish to provide a very specific xml representation to return a DOMDocument, and, for other data structures where xml is a secondary concern, then we will use some default heuristics to convert from arrays to xml. | Visibility | Function | |:-----------|:---------| | public | arrayToXml(mixed $structuredData) : [\DOMDocument](http://php.net/manual/en/class.domdocument.php)
Convert data to a format suitable for use in a list. By default, the array values will be used. Implement ListDataInterface to use some other criteria (e.g. array keys). |
### Class: \Consolidation\OutputFormatters\Transformations\DomToArraySimplifier > Simplify a DOMDocument to an array. | Visibility | Function | |:-----------|:---------| | public | __construct() : void | | public | canSimplify([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool | | public | simplifyToArray(mixed $structuredData, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : void | | protected | elementToArray([\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : array
Recursively convert the provided DOM element into a php array. | | protected | getIdOfValue(mixed $value) : string
If the object has an 'id' or 'name' element, then use that as the array key when storing this value in its parent. | | protected | getNodeAttributes([\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : array
Get all of the attributes of the provided element. | | protected | getNodeChildren([\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : array
Get all of the children of the provided element, with simplification. | | protected | getNodeChildrenData([\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : array
Get the data from the children of the provided node in preliminary form. | | protected | getUniformChildren(string $parentKey, [\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : array
Convert the children of the provided DOM element into an array. Here, 'uniform' means that all of the element names of the children are identical, and further, the element name of the parent is the plural form of the child names. When the children are uniform in this way, then the parent element name will be used as the key to store the children in, and the child list will be returned as a simple list with their (duplicate) element names omitted. | | protected | getUniqueChildren(string $parentKey, [\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : array
Convert the children of the provided DOM element into an array. Here, 'unique' means that all of the element names of the children are different. Since the element names will become the key of the associative array that is returned, so duplicates are not supported. If there are any duplicates, then an exception will be thrown. | | protected | hasUniformChildren([\DOMNode](http://php.net/manual/en/class.domnode.php) $element) : boolean
Determine whether the children of the provided element are uniform. | | protected | valueCanBeSimplified([\DOMNode](http://php.net/manual/en/class.domnode.php) $value) : boolean
Determine whether the provided value has additional unnecessary nesting. {"color": "red"} is converted to "red". No other simplification is done. | *This class implements [\Consolidation\OutputFormatters\Transformations\SimplifyToArrayInterface](#interface-consolidationoutputformatterstransformationssimplifytoarrayinterface)*
### Interface: \Consolidation\OutputFormatters\Transformations\OverrideRestructureInterface | Visibility | Function | |:-----------|:---------| | public | overrideRestructure(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : mixed
Select data to use directly from the structured output, before the restructure operation has been executed. |
### Class: \Consolidation\OutputFormatters\Transformations\PropertyListTableTransformation | Visibility | Function | |:-----------|:---------| | public | getOriginalData() : mixed | *This class extends [\Consolidation\OutputFormatters\Transformations\TableTransformation](#class-consolidationoutputformatterstransformationstabletransformation)* *This class implements [\Consolidation\OutputFormatters\StructuredData\OriginalDataInterface](#interface-consolidationoutputformattersstructureddataoriginaldatainterface), [\Consolidation\OutputFormatters\StructuredData\TableDataInterface](#interface-consolidationoutputformattersstructureddatatabledatainterface), \IteratorAggregate, \Traversable, \ArrayAccess, \Serializable, \Countable*
### Class: \Consolidation\OutputFormatters\Transformations\PropertyParser > Transform a string of properties into a PHP associative array. Input: one: red two: white three: blue Output: [ 'one' => 'red', 'two' => 'white', 'three' => 'blue', ] | Visibility | Function | |:-----------|:---------| | public static | parse(mixed $data) : void |
### Class: \Consolidation\OutputFormatters\Transformations\ReorderFields > Reorder the field labels based on the user-selected fields to display. | Visibility | Function | |:-----------|:---------| | public | reorder(string/array $fields, array $fieldLabels, array $data) : array
Given a simple list of user-supplied field keys or field labels, return a reordered version of the field labels matching the user selection. key to the field label | | protected | convertToRegex(mixed $str) : void
Convert the provided string into a regex suitable for use in preg_match. Matching occurs in the same way as the Symfony Finder component: http://symfony.com/doc/current/components/finder.html#file-name | | protected | getSelectedFieldKeys(mixed $fields, mixed $fieldLabels) : mixed | | protected | isRegex(string $str) : bool Whether the given string is a regex
Checks whether the string is a regex. This function is copied from MultiplePcreFilterIterator in the Symfony Finder component. | | protected | matchFieldInLabelMap(mixed $field, mixed $fieldLabels) : void | | protected | reorderFieldLabels(mixed $fields, mixed $fieldLabels, mixed $data) : void |
### Interface: \Consolidation\OutputFormatters\Transformations\SimplifyToArrayInterface | Visibility | Function | |:-----------|:---------| | public | canSimplify([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $structuredOutput) : bool
Indicate whether or not the given data type can be simplified to an array | | public | simplifyToArray(mixed $structuredOutput, [\Consolidation\OutputFormatters\Options\FormatterOptions](#class-consolidationoutputformattersoptionsformatteroptions) $options) : array
Convert structured data into a generic array, usable by generic array-based formatters. Objects that implement this interface may be attached to the FormatterManager, and will be used on any data structure that needs to be simplified into an array. An array simplifier should take no action other than to return its input data if it cannot simplify the provided data into an array. |
### Class: \Consolidation\OutputFormatters\Transformations\TableTransformation | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $data, mixed $fieldLabels, array $rowLabels=array()) : void | | public | getHeader(mixed $key) : mixed | | public | getHeaders() : mixed | | public | getLayout() : mixed | | public | getOriginalData() : mixed | | public | getRowLabel(mixed $rowid) : mixed | | public | getRowLabels() : mixed | | public | getTableData(bool $includeRowKey=false) : mixed | | public | isList() : bool | | public | setLayout(mixed $layout) : void | | protected | convertTableToList() : void | | protected | getRowDataWithKey(mixed $data) : mixed | | protected static | transformRow(mixed $row, mixed $fieldLabels) : void | | protected static | transformRows(mixed $data, mixed $fieldLabels) : void | *This class extends \ArrayObject* *This class implements \Countable, \Serializable, \ArrayAccess, \Traversable, \IteratorAggregate, [\Consolidation\OutputFormatters\StructuredData\TableDataInterface](#interface-consolidationoutputformattersstructureddatatabledatainterface), [\Consolidation\OutputFormatters\StructuredData\OriginalDataInterface](#interface-consolidationoutputformattersstructureddataoriginaldatainterface)*
### Class: \Consolidation\OutputFormatters\Transformations\WordWrapper | Visibility | Function | |:-----------|:---------| | public | __construct(mixed $width) : void | | public | minimumWidth(mixed $colkey, mixed $width) : void
Set the minimum width of just one column | | public | setMinimumWidths(array $minimumWidths) : void
If columns have minimum widths, then set them here. | | public | setPaddingFromStyle(\Symfony\Component\Console\Helper\TableStyle $style) : void
Calculate our padding widths from the specified table style. | | public | wrap(array $rows, array $widths=array()) : array
Wrap the cells in each part of the provided data table | | protected | calculateWidths(mixed $rows, array $widths=array()) : void
Determine what widths we'll use for wrapping. | | protected | wrapCell(mixed $cell, string $cellWidth) : mixed
Wrap one cell. Guard against modifying non-strings and then call through to wordwrap(). |
### Class: \Consolidation\OutputFormatters\Transformations\Wrap\CalculateWidths > Calculate column widths for table cells. Influenced by Drush and webmozart/console. | Visibility | Function | |:-----------|:---------| | public | __construct() : void | | public | calculate(mixed $availableWidth, [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $dataWidths, [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $minimumWidths) : void
Given the total amount of available space, and the width of the columns to place, calculate the optimum column widths to use. | | public | calculateLongestCell(mixed $rows) : void
Calculate the longest cell data from any row of each of the cells. | | public | calculateLongestWord(mixed $rows) : void
Calculate the longest word and longest line in the provided data. | | public | distributeLongColumns(mixed $availableWidth, [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $dataWidths, [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $minimumWidths) : void
Distribute the remainig space among the columns that were not included in the list of "short" columns. | | public | getShortColumns(mixed $availableWidth, [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $dataWidths, [\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $minimumWidths) : mixed
Return all of the columns whose longest line length is less than or equal to the average width. | | protected | calculateColumnWidths(mixed $rows, \callable $fn) : void | | protected static | longestWordLength(string $str) : int
Return the length of the longest word in the string. |
### Class: \Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths > Calculate the width of data in table cells in preparation for word wrapping. | Visibility | Function | |:-----------|:---------| | public | __construct(array $widths=array()) : void | | public | adjustMinimumWidths(mixed $availableWidth, mixed $dataCellWidths) : void
If the widths specified by this object do not fit within the provided avaiable width, then reduce them all proportionally. | | public | averageWidth(mixed $availableWidth) : void
Calculate how much space is available on average for all columns. | | public | combine([\Consolidation\OutputFormatters\Transformations\Wrap\ColumnWidths](#class-consolidationoutputformatterstransformationswrapcolumnwidths) $combineWith) : void
Combine this set of widths with another set, and return a new set that contains the entries from both. | | public | count() : void
Return the number of columns. | | public | distribute(mixed $availableWidth) : void
Return proportional weights | | public | enforceMinimums(mixed $minimumWidths) : void
Ensure that every item in $widths that has a corresponding entry in $minimumWidths is as least as large as the minimum value held there. | | public | findShortColumns(mixed $thresholdWidth) : mixed
Find all of the columns that are shorter than the specified threshold. | | public | findUndersizedColumns(mixed $minimumWidths) : mixed
Find all of the columns that are shorter than the corresponding minimum widths. | | public | isEmpty() : bool
Return true if there is no data in this object | | public | keys() : void
Return the available keys (column identifiers) from the calculated data set. | | public | lastColumn() : void | | public | paddingSpace(mixed $paddingInEachCell, mixed $extraPaddingAtEndOfLine, mixed $extraPaddingAtBeginningOfLine) : void | | public | removeColumns(mixed $columnKeys) : void
Remove all of the specified columns from this data structure. | | public | selectColumns(mixed $columnKeys) : void
Select all columns that exist in the provided list of keys. | | public | setWidth(mixed $key, mixed $width) : void
Set the length of the specified column. | | public static | sumWidth(mixed $widths) : void
Return the sum of the lengths of the provided widths. | | public | totalWidth() : void
Return the sum of the lengths of the provided widths. | | public | width(mixed $key) : void
Return the length of the specified column. | | public | widths() : void
Return all of the lengths | | protected | findColumnsUnderThreshold(array $thresholdWidths) : mixed |
### Interface: \Consolidation\OutputFormatters\Validate\ValidationInterface > Formatters may implement ValidationInterface in order to indicate whether a particular data structure is supported. Any formatter that does not implement ValidationInterface is assumed to only operate on arrays, or data types that implement SimplifyToArrayInterface. | Visibility | Function | |:-----------|:---------| | public | isValidDataType([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $dataType) : bool
Return true if the specified format is valid for use with this formatter. | | public | validate(mixed $structuredData) : mixed
Throw an IncompatibleDataException if the provided data cannot be processed by this formatter. Return the source data if it is valid. The data may be encapsulated or converted if necessary. |
### Interface: \Consolidation\OutputFormatters\Validate\ValidDataTypesInterface > Formatters may implement ValidDataTypesInterface in order to indicate exactly which formats they support. The validDataTypes method can be called to retrieve a list of data types useful in providing hints in exception messages about which data types can be used with the formatter. Note that it is OPTIONAL for formatters to implement this interface. If a formatter implements only ValidationInterface, then clients that request the formatter via FormatterManager::write() will still get a list (via an InvalidFormatException) of all of the formats that are usable with the provided data type. Implementing ValidDataTypesInterface is benefitial to clients who instantiate a formatter directly (via `new`). Formatters that implement ValidDataTypesInterface may wish to use ValidDataTypesTrait. | Visibility | Function | |:-----------|:---------| | public | validDataTypes() : [\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php)[]
Return the list of data types acceptable to this formatter | *This class implements [\Consolidation\OutputFormatters\Validate\ValidationInterface](#interface-consolidationoutputformattersvalidatevalidationinterface)*