Exporter
extends ExporterBase
in package
Basic exporter
Basic exporter class for exporting all data from HierarchyBase objects. It uses all other specialized exporters and also inherits their modifiers specific.
Tags
Table of Contents
- $exporters : array<string|int, mixed>
- $modifiers : array<string|int, mixed>
- $object : WithId
- __call() : Exporter
- Try to call a modifier method on other used exporters
- __construct() : mixed
- export() : array<string|int, mixed>
- Simple export query without any modifiers
- get() : array<string|int, mixed>
- Finish the export query -> get the result
- getBasic() : array<string|int, mixed>
- Gets the basic unmodified data
- getJson() : string
- Return result as json
- jsonSerialize() : array<string|int, mixed>
- Serialize exported data as JSON
- start() : Exporter
- Start an export query
- withSetup() : $this
- Query modifier, adding a setup exporter
- applyModifiers() : void
- Apply set modifiers to data array
Properties
$exporters
protected
array<string|int, mixed>
$exporters
= []
$modifiers
protected
array<string|int, mixed>
$modifiers
= []
$object
protected
WithId
$object
Methods
__call()
Try to call a modifier method on other used exporters
public
__call(string $name, array<string|int, mixed> $arguments) : Exporter
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
Exporter —__construct()
public
__construct(HierarchyBase $object) : mixed
Parameters
- $object : HierarchyBase
Return values
mixed —export()
Simple export query without any modifiers
public
static export(HierarchyBase $object) : array<string|int, mixed>
Parameters
- $object : HierarchyBase
Return values
array<string|int, mixed> —get()
Finish the export query -> get the result
public
get() : array<string|int, mixed>
Return values
array<string|int, mixed> —The query result
getBasic()
Gets the basic unmodified data
public
getBasic() : array<string|int, mixed>
Return values
array<string|int, mixed> —getJson()
Return result as json
public
getJson() : string
Tags
Return values
string —jsonSerialize()
Serialize exported data as JSON
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —start()
Start an export query
public
static start(HierarchyBase $object) : Exporter
Parameters
- $object : HierarchyBase
Return values
Exporter —withSetup()
Query modifier, adding a setup exporter
public
withSetup() : $this
Tags
Return values
$this —applyModifiers()
Apply set modifiers to data array
protected
applyModifiers(array<string|int, mixed> &$data) : void
Parameters
- $data : array<string|int, mixed>