EntityToArraySimplifier
class EntityToArraySimplifier implements SimplifyToArrayInterface (View source)
Simplify a EntityInterface to an array.
Methods
No description
Indicate whether or not the given data type can be simplified to an array
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.
Details
__construct()
No description
canSimplify(ReflectionClass $dataType)
Indicate whether or not the given data type can be simplified to an array
array
simplifyToArray($structuredData, FormatterOptions $options)
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.