class audit_log_mapper extends abstract_mapper

internal  
 

Audit log mapper.

Converts rows from middag_audit_log into domain aggregates and serializes entities back to persistence records. Diffs and snapshots are handled by the repository aggregation layer.

Methods

db_to_domain(stdClass $record, array $metadata = [])

Convert DB record to audit log entity (without child aggregates).

domain_to_db(entity_interface $entity)

Convert audit log entity to persistence record.

Details

at line 45
entity_interface db_to_domain(stdClass $record, array $metadata = [])

Convert DB record to audit log entity (without child aggregates).

Parameters

stdClass $record

The raw row from persistence

array $metadata

Key-value array of related metadata

Return Value

entity_interface

The hydrated domain entity

at line 82
stdClass domain_to_db(entity_interface $entity)

Convert audit log entity to persistence record.

Parameters

entity_interface $entity

Return Value

stdClass