LineFormatter extends AbstractItemFormatter
Abstract item formatter
Table of Contents
Properties
| $formatFields | |
| $itemFactory |
Methods
| __construct() | Init |
| format() | Formats the given fields |
| formatService() | Formats the given service data |
| make() | Makes a formatted Item from the given fields and the formatted fields available from the given method |
| makeItem() | Creates an item |
Methods
__construct()
Init
public
__construct(ItemFactory $itemFactory, FormatFieldsInterface $fields) : mixed
Parameters
- $itemFactory : ItemFactory
-
An instance of the ItemFactory
- $fields : FormatFieldsInterface
format()
Formats the given fields
public
format(stdClass $fields) : Item
Parameters
- $fields : stdClass
-
An stdClass object representing the fields
Return values
Item —An Item instance
formatService()
Formats the given service data
public
formatService(stdClass $fields) : Item
Parameters
- $fields : stdClass
-
An stdClass object representing the object data fields
Return values
Item —An Item instance
make()
Makes a formatted Item from the given fields and the formatted fields available from the given method
public
make(string $method, stdClass $fields) : Item
Parameters
- $method : string
-
The FormatFields method to call for matching fields
- $fields : stdClass
-
An stdClass object representing the object data fields
Return values
Item —A formatted Item
makeItem()
Creates an item
public
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