Documentation

Auditor
in package

Auditor class

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

Properties

$adapter  : AdapterInterface|null
Auditor adapter

Methods

__construct()  : mixed
Constructor
adapter()  : AdapterInterface
Get the adapter
addMetadata()  : Auditor
Add to the metadata
getStateData()  : mixed
Get state data
hasDiff()  : bool
Check if the model states are different
hasStateData()  : bool
Has state data
resolveDiff()  : Auditor
Resolve the differences in values between the model states
send()  : mixed
Send the results of the audit
setDiff()  : Auditor
Set the differences in values between the model states (that have already been processed)
setDomain()  : Auditor
Set domain, route and method
setMetadata()  : Auditor
Set the metadata
setModel()  : Auditor
Set user
setStateData()  : Auditor
Set state data
setUser()  : Auditor
Set user

Properties

Methods

addMetadata()

Add to the metadata

public addMetadata(string $name, mixed $value) : Auditor
Parameters
$name : string
$value : mixed
Return values
Auditor

getStateData()

Get state data

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

hasDiff()

Check if the model states are different

public hasDiff() : bool
Return values
bool

hasStateData()

Has state data

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

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 ]) : Auditor
Parameters
$old : array<string|int, mixed> = []
$new : array<string|int, mixed> = []
$state : bool = true
Return values
Auditor

send()

Send the results of the audit

public send([array<string|int, mixed>|null $old = null ][, array<string|int, mixed>|null $new = null ][, bool $state = true ]) : mixed
Parameters
$old : array<string|int, mixed>|null = null
$new : array<string|int, mixed>|null = null
$state : bool = true

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 = [] ]) : Auditor
Parameters
$old : array<string|int, mixed> = []
$new : array<string|int, mixed> = []
Return values
Auditor

setDomain()

Set domain, route and method

public setDomain([string|null $domain = null ][, string|null $route = null ][, string|null $method = null ]) : Auditor
Parameters
$domain : string|null = null
$route : string|null = null
$method : string|null = null
Return values
Auditor

setMetadata()

Set the metadata

public setMetadata(array<string|int, mixed> $metadata) : Auditor
Parameters
$metadata : array<string|int, mixed>
Return values
Auditor

setModel()

Set user

public setModel([string|null $model = null ][, int|string|null $modelId = null ]) : Auditor
Parameters
$model : string|null = null
$modelId : int|string|null = null
Return values
Auditor

setStateData()

Set state data

public setStateData(array<string|int, mixed> $stateData) : Auditor
Parameters
$stateData : array<string|int, mixed>
Return values
Auditor

setUser()

Set user

public setUser([string|null $username = null ][, int|null $userId = null ]) : Auditor
Parameters
$username : string|null = null
$userId : int|null = null
Return values
Auditor

        
On this page

Search results