Data
Less than 1 minute
Data
Represents a data synchronization set for database import/export operations.
class Data extends \Hazaar\DBI\Manager\StructEncapsulates applied versions and sync items, and provides methods for loading, hashing, and running sync operations.
Properties
appliedVersions
public array $appliedVersionsitems
public array $itemsMethods
construct
Initializes the data set from the provided data.
public construct(mixed $data): voidWraps the input data in an 'items' array for internal consistency.
Parameters
| Parameter | Type | Description |
|---|---|---|
$data | mixed | The data to initialize from. Modified by reference. |
load
Loads a data set from a JSON file.
public load(string $sourceFile): selfParameters
| Parameter | Type | Description |
|---|---|---|
$sourceFile | string | the path to the JSON file to load |
getHash
Returns a hash of the items for change detection or caching.
public getHash(): stringrun
Executes all sync items in the data set, logging progress and statistics.
public run(Adapter $dbi): boolParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | the database adapter instance |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000