annotate vendor/consolidation/output-formatters/src/Transformations/SimplifyToArrayInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2 namespace Consolidation\OutputFormatters\Transformations;
Chris@0 3
Chris@0 4 use Consolidation\OutputFormatters\Options\FormatterOptions;
Chris@0 5
Chris@0 6 interface SimplifyToArrayInterface
Chris@0 7 {
Chris@0 8 /**
Chris@0 9 * Convert structured data into a generic array, usable by generic
Chris@0 10 * array-based formatters. Objects that implement this interface may
Chris@0 11 * be attached to the FormatterManager, and will be used on any data
Chris@0 12 * structure that needs to be simplified into an array. An array
Chris@0 13 * simplifier should take no action other than to return its input data
Chris@0 14 * if it cannot simplify the provided data into an array.
Chris@0 15 *
Chris@0 16 * @param mixed $structuredOutput The data to simplify to an array.
Chris@0 17 *
Chris@0 18 * @return array
Chris@0 19 */
Chris@0 20 public function simplifyToArray($structuredOutput, FormatterOptions $options);
Chris@0 21
Chris@0 22 /**
Chris@0 23 * Indicate whether or not the given data type can be simplified to an array
Chris@0 24 */
Chris@0 25 public function canSimplify(\ReflectionClass $structuredOutput);
Chris@0 26 }