Mercurial > hg > isophonics-drupal-site
view 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 |
line wrap: on
line source
<?php namespace Consolidation\OutputFormatters\Transformations; use Consolidation\OutputFormatters\Options\FormatterOptions; interface SimplifyToArrayInterface { /** * 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. * * @param mixed $structuredOutput The data to simplify to an array. * * @return array */ public function simplifyToArray($structuredOutput, FormatterOptions $options); /** * Indicate whether or not the given data type can be simplified to an array */ public function canSimplify(\ReflectionClass $structuredOutput); }