\Pop\AuditAuditor

Auditor class

Summary

Methods
Properties
Constants
__construct()
adapter()
setModel()
setUser()
setDomain()
setMetadata()
addMetadata()
setDiff()
resolveDiff()
hasDiff()
send()
No public properties found
No constants found
No protected methods found
$adapter
N/A
No private methods found
No private properties found
N/A

Properties

Methods

adapter()

adapter() : mixed

Get the adapter

Returns

mixed

setModel()

setModel(string  $model = null, integer  $modelId = null) : \Pop\Audit\Auditor

Set user

Parameters

string $model
integer $modelId

Returns

\Pop\Audit\Auditor

setUser()

setUser(string  $username = null, integer  $userId = null) : \Pop\Audit\Auditor

Set user

Parameters

string $username
integer $userId

Returns

\Pop\Audit\Auditor

setDomain()

setDomain(string  $domain = null, string  $route = null, string  $method = null) : \Pop\Audit\Auditor

Set domain, route and method

Parameters

string $domain
string $route
string $method

Returns

\Pop\Audit\Auditor

setMetadata()

setMetadata(array  $metadata) : \Pop\Audit\Auditor

Set the metadata

Parameters

array $metadata

Returns

\Pop\Audit\Auditor

addMetadata()

addMetadata(string  $name, mixed  $value) : \Pop\Audit\Auditor

Add to the metadata

Parameters

string $name
mixed $value

Returns

\Pop\Audit\Auditor

setDiff()

setDiff(array  $old = array(), array  $new = array()) : self

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

Parameters

array $old
array $new

Returns

self

resolveDiff()

resolveDiff(array  $old = array(), array  $new = array()) : self

Resolve the differences in values between the model states

Parameters

array $old
array $new

Returns

self

hasDiff()

hasDiff() : boolean

Check if the model states are different

Returns

boolean

send()

send(array  $old = null, array  $new = null) : mixed

Send the results of the audit

Parameters

array $old
array $new

Returns

mixed