Documentation

Revision
in package

Support for revision signatures on API calls.

Table of Contents

checkBatchRevision()  : bool
checkFetch()  : string
clearBatch()  : mixed
create()  : string
Create a revision signature based on a hash of the ledger's salt and the server-based last record update timestamp, with a fallback for database managers that don't support server timestamps.
endBatch()  : mixed
isInBatch()  : bool
saveBatchFetch()  : mixed
saveBatchRevision()  : void
Save a model's revision hashes through the processing of a batch.
startBatch()  : void

Methods

checkBatchRevision()

public static checkBatchRevision(string $key, string $revision, string $newRevision) : bool
Parameters
$key : string
$revision : string
$newRevision : string
Return values
bool

checkFetch()

public static checkFetch(string $batchKey) : string
Parameters
$batchKey : string
Return values
string

clearBatch()

public static clearBatch() : mixed
Return values
mixed

create()

Create a revision signature based on a hash of the ledger's salt and the server-based last record update timestamp, with a fallback for database managers that don't support server timestamps.

public static create(Carbon|null $revision, Carbon $fallback) : string
Parameters
$revision : Carbon|null

The database server maintained timestamp.

$fallback : Carbon

The Laravel maintained timestamp.

Tags
throws
Exception
Return values
string

endBatch()

public static endBatch() : mixed
Return values
mixed

isInBatch()

public static isInBatch() : bool
Return values
bool

saveBatchFetch()

public static saveBatchFetch(string $batchKey, string $revisionHash) : mixed
Parameters
$batchKey : string
$revisionHash : string
Return values
mixed

saveBatchRevision()

Save a model's revision hashes through the processing of a batch.

public static saveBatchRevision(string $key, string $revision) : void
Parameters
$key : string

A unique identifier for the model.

$revision : string

The revision hash.

Return values
void

startBatch()

public static startBatch() : void
Return values
void

Search results