Mercurial > hg > isophonics-drupal-site
comparison vendor/consolidation/output-formatters/src/Transformations/SimplifyToArrayInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 namespace Consolidation\OutputFormatters\Transformations; | |
3 | |
4 use Consolidation\OutputFormatters\Options\FormatterOptions; | |
5 | |
6 interface SimplifyToArrayInterface | |
7 { | |
8 /** | |
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. | |
15 * | |
16 * @param mixed $structuredOutput The data to simplify to an array. | |
17 * | |
18 * @return array | |
19 */ | |
20 public function simplifyToArray($structuredOutput, FormatterOptions $options); | |
21 | |
22 /** | |
23 * Indicate whether or not the given data type can be simplified to an array | |
24 */ | |
25 public function canSimplify(\ReflectionClass $structuredOutput); | |
26 } |