Tournament Generator

ExporterBase implements ExporterInterface, JsonSerializable

Base class for exporters

Exporters operate on some HierarchyBase class. They extract data and/or settings from these classes in a form of PHP array. Exporters also allow of adding modifiers to the exported query - adding more data. These modifiers are added via specific methods (usually starting with "with" keyword).

Tags
author

Tomáš Vojík vojik@wboy.cz

since
0.5

Interfaces, Classes and Traits

ExporterInterface
Interface for exporters
JsonSerializable

Table of Contents

$modifiers  : array<string|int, mixed>
$object  : WithId
__construct()  : mixed
get()  : array<string|int, mixed>
Finish the export query -> get the result
getJson()  : string
Return result as json
jsonSerialize()  : array<string|int, mixed>
Serialize exported data as JSON
applyModifiers()  : void
Apply set modifiers to data array

Properties

$modifiers

protected array<string|int, mixed> $modifiers = []

Methods

get()

Finish the export query -> get the result

public get() : array<string|int, mixed>
Return values
array<string|int, mixed>

The query result

jsonSerialize()

Serialize exported data as JSON

public jsonSerialize() : array<string|int, mixed>
Tags
see
json_encode()
Return values
array<string|int, mixed>

applyModifiers()

Apply set modifiers to data array

protected applyModifiers(array<string|int, mixed> &$data) : void
Parameters
$data : array<string|int, mixed>
Return values
void

Search results