AbstractArrayFormatter implements ArrayFormatterInterface
AbstractYes
Abstract array formatter
Table of Contents
Interfaces
| ArrayFormatterInterface | Array formatter interface |
Properties
| $itemFactory |
Methods
| __construct() | Init |
| format() | Formats the given fields |
| makeItem() | Creates an item |
Methods
__construct()
Init
public
__construct(ItemFactory $itemFactory) : mixed
Parameters
- $itemFactory : ItemFactory
-
An instance of the ItemFactory
format()
Formats the given fields
public
abstract format(array<string|int, mixed> $fields) : mixed
Parameters
- $fields : array<string|int, mixed>
-
An array of fields to format
makeItem()
Creates an item
protected
makeItem(stdClass|array<string|int, mixed> $fields) : Item
Parameters
- $fields : stdClass|array<string|int, mixed>
-
A set of fields to include on the item
Return values
Item —An Item instance