Mercurial > hg > isophonics-drupal-site
view 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 |
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); }