PHP code example of polysource / audit
1. Go to this page and download the library: Download polysource/audit library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
polysource / audit example snippets
return [
Polysource\Audit\PolysourceAuditBundle::class => ['all' => true],
];
#[AutoconfigureTag('polysource.audit_logger')]
final class SplunkAuditLogger implements AuditLoggerInterface
{
public function log(AuditEntry $entry): void
{
$this->splunk->send([
'time' => $entry->occurredAt->format(\DateTimeInterface::ATOM),
'event' => $entry->actionName,
'actor' => $entry->actorId,
'outcome' => $entry->outcome->value,
]);
}
}