IMP_Maillog
in package
Base class implementing logging of responses to e-mail messages.
Tags
Table of Contents
Properties
- $storage : IMP_Maillog_Storage_Base
- Storage driver.
Methods
- __construct() : mixed
- Constructor.
- deleteLog() : mixed
- Delete log entries.
- getChanges() : array<string|int, mixed>
- Retrieve changes to the maillog since the provided timestamp.
- getLog() : array<string|int, mixed>
- Retrieve history for a message.
- log() : mixed
- Create a log entry.
Properties
$storage
Storage driver.
public
IMP_Maillog_Storage_Base
$storage
Methods
__construct()
Constructor.
public
__construct(IMP_Maillog_Storage_Base $storage) : mixed
Parameters
- $storage : IMP_Maillog_Storage_Base
-
Storage driver.
deleteLog()
Delete log entries.
public
deleteLog(IMP_Maillog_Messages|array<string|int, mixed> $msgs) : mixed
Parameters
- $msgs : IMP_Maillog_Messages|array<string|int, mixed>
-
A list of message objects to delete.
getChanges()
Retrieve changes to the maillog since the provided timestamp.
public
getChanges(int $ts) : array<string|int, mixed>
Parameters
- $ts : int
-
Timestamp.
Return values
array<string|int, mixed> —An array of messages (IMP_Maillog_Message objects) changed since the provided timestamp.
getLog()
Retrieve history for a message.
public
getLog(IMP_Maillog_Message $msg[, array<string|int, mixed> $types = array() ]) : array<string|int, mixed>
Parameters
- $msg : IMP_Maillog_Message
-
A message object.
- $types : array<string|int, mixed> = array()
-
Return only these log types (IMP_Maillog_Log_Base class names). If empty, returns all types.
Return values
array<string|int, mixed> —List of IMP_Maillog_Log_Base objects.
log()
Create a log entry.
public
log(mixed $msgs, IMP_Maillog_Log_Base $log) : mixed
Parameters
- $msgs : mixed
-
An IMP_Maillog_Message object (or an array of objects).
- $log : IMP_Maillog_Log_Base
-
The log object.