First step is easier here, since we have reorder fields factored out. The actual reordering of the data is done by the table transformation class, which also restructures the output.
It would be a small change to reorder the fields without restructuring the output. This would involve an extra redundant transformation when doing table output, but would keep the code clean and minimal, as field transformation could be done universally, before the specific formatter is called.
The alternate implementation would be to have every formatter individually handle formats -- as the code is currently set up to do. This isn't as good, though, as it would lead to duplication, and inconsistency.
See:
https://github.com/drush-ops/drush/issues/333
First step is easier here, since we have reorder fields factored out. The actual reordering of the data is done by the table transformation class, which also restructures the output.
It would be a small change to reorder the fields without restructuring the output. This would involve an extra redundant transformation when doing table output, but would keep the code clean and minimal, as field transformation could be done universally, before the specific formatter is called.
The alternate implementation would be to have every formatter individually handle formats -- as the code is currently set up to do. This isn't as good, though, as it would lead to duplication, and inconsistency.