public function audit($action)
{
// Not active? get out of here
if (!$this->active) {
return;
}
// Lets check if the whole class should be ignored
if (sizeof($this->ignoredClasses) > 0 && array_search(get_class($this->owner), $this->ignoredClasses) !== false) {
return;
}
// If this is a delete then just write one row and get out of here
if ($action == 'DELETE') {
$this->saveAuditTrailDelete();
return;
}
// Now lets actually write the attributes
$this->auditAttributes($action);
}