2 namespace Consolidation\OutputFormatters\Transformations;
4 use Consolidation\OutputFormatters\Options\FormatterOptions;
6 interface SimplifyToArrayInterface
9 * Convert structured data into a generic array, usable by generic
10 * array-based formatters. Objects that implement this interface may
11 * be attached to the FormatterManager, and will be used on any data
12 * structure that needs to be simplified into an array. An array
13 * simplifier should take no action other than to return its input data
14 * if it cannot simplify the provided data into an array.
16 * @param mixed $structuredOutput The data to simplify to an array.
20 public function simplifyToArray($structuredOutput, FormatterOptions $options);
23 * Indicate whether or not the given data type can be simplified to an array
25 public function canSimplify(\ReflectionClass $structuredOutput);