Documentation

AdapterInterface
in

Auditor adapter interface

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
2.0.0

Table of Contents

Methods

addMetadata()  : AdapterInterface
Add to the metadata
getAction()  : string|null
Get the action
getDomain()  : string|null
Get the domain
getMetadata()  : mixed
Get the metadata
getMethod()  : string|null
Get the method
getModel()  : string|null
Get the model name
getModelId()  : int|string|null
Get the model ID
getModified()  : array<string|int, mixed>
Get the modified model state differences
getOriginal()  : array<string|int, mixed>
Get the original model state differences
getRoute()  : string|null
Get the route
getSnapshot()  : array<string|int, mixed>
Get model snapshot by ID
getStateByDate()  : array<string|int, mixed>
Get model state by date
getStateById()  : array<string|int, mixed>
Get model state by ID
getStateByModel()  : array<string|int, mixed>
Get model state by model
getStateByTimestamp()  : array<string|int, mixed>
Get model state by timestamp
getStateData()  : mixed
Get the final state
getStates()  : array<string|int, mixed>
Get model states
getUserId()  : int|string|null
Get the user ID
getUsername()  : string|null
Get the username
hasDiff()  : bool
Check if the model states are different
hasMetadata()  : bool
Determine if there is metadata
hasStateData()  : bool
Determine if there is a final state
prepareData()  : array<string|int, mixed>
Prepare data
resolveDiff()  : AdapterInterface
Resolve the differences in values between the model states
send()  : mixed
Send the results of the audit
setDiff()  : AdapterInterface
Set the differences in values between the model states (that have already been processed)
setDomain()  : AdapterInterface
Set the domain
setMetadata()  : AdapterInterface
Set the metadata
setMethod()  : AdapterInterface
Set the method
setModel()  : AdapterInterface
Set the model name
setModelId()  : AdapterInterface
Set the model ID
setRoute()  : AdapterInterface
Set the route
setStateData()  : AdapterInterface
Set the final state data
setUserId()  : AdapterInterface
Set the user ID
setUsername()  : AdapterInterface
Set the username

Methods

getAction()

Get the action

public getAction() : string|null
Return values
string|null

getDomain()

Get the domain

public getDomain() : string|null
Return values
string|null

getMetadata()

Get the metadata

public getMetadata([string|null $name = null ]) : mixed
Parameters
$name : string|null = null

getMethod()

Get the method

public getMethod() : string|null
Return values
string|null

getModel()

Get the model name

public getModel() : string|null
Return values
string|null

getModelId()

Get the model ID

public getModelId() : int|string|null
Return values
int|string|null

getModified()

Get the modified model state differences

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

getOriginal()

Get the original model state differences

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

getRoute()

Get the route

public getRoute() : string|null
Return values
string|null

getSnapshot()

Get model snapshot by ID

public getSnapshot(int|string $id[, bool $post = false ]) : array<string|int, mixed>
Parameters
$id : int|string
$post : bool = false
Return values
array<string|int, mixed>

getStateByDate()

Get model state by date

public getStateByDate(string $from[, string $backTo = null ]) : array<string|int, mixed>
Parameters
$from : string
$backTo : string = null
Return values
array<string|int, mixed>

getStateById()

Get model state by ID

public getStateById(int|string $id) : array<string|int, mixed>
Parameters
$id : int|string
Return values
array<string|int, mixed>

getStateByModel()

Get model state by model

public getStateByModel(string $model[, int|string|null $modelId = null ]) : array<string|int, mixed>
Parameters
$model : string
$modelId : int|string|null = null
Return values
array<string|int, mixed>

getStateByTimestamp()

Get model state by timestamp

public getStateByTimestamp(string $from[, string|null $backTo = null ]) : array<string|int, mixed>
Parameters
$from : string
$backTo : string|null = null
Return values
array<string|int, mixed>

getStateData()

Get the final state

public getStateData([string|null $name = null ]) : mixed
Parameters
$name : string|null = null

getStates()

Get model states

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

getUserId()

Get the user ID

public getUserId() : int|string|null
Return values
int|string|null

getUsername()

Get the username

public getUsername() : string|null
Return values
string|null

hasDiff()

Check if the model states are different

public hasDiff() : bool
Return values
bool

hasMetadata()

Determine if there is metadata

public hasMetadata([string|null $name = null ]) : bool
Parameters
$name : string|null = null
Return values
bool

hasStateData()

Determine if there is a final state

public hasStateData() : bool
Return values
bool

prepareData()

Prepare data

public prepareData([bool $jsonEncode = true ]) : array<string|int, mixed>
Parameters
$jsonEncode : bool = true
Return values
array<string|int, mixed>

resolveDiff()

Resolve the differences in values between the model states

public resolveDiff(array<string|int, mixed> $old, array<string|int, mixed> $new[, bool $state = true ]) : AdapterInterface
Parameters
$old : array<string|int, mixed>
$new : array<string|int, mixed>
$state : bool = true
Return values
AdapterInterface

setDiff()

Set the differences in values between the model states (that have already been processed)

public setDiff(array<string|int, mixed> $old, array<string|int, mixed> $new) : AdapterInterface
Parameters
$old : array<string|int, mixed>
$new : array<string|int, mixed>
Return values
AdapterInterface

        
On this page

Search results