PHP Класс IMP_Sentmail, horde

Автор: Jan Schneider ([email protected])
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_params array Hash containing configuration parameters.

Открытые методы

Метод Описание
__construct ( array $params = [] ) Constructor.
__get ( $name )
favouriteRecipients ( integer $limit, mixed $filter = null ) : array Returns the favourite recipients.
gc ( ) Garbage collect log entries.
log ( integer $action, string $message_id, string | array $recipients, boolean $success = true ) Logs an attempt to send a message.
numberOfRecipients ( integer $hours, boolean $user = false ) : integer Returns the number of recipients within a certain time period.

Защищенные методы

Метод Описание
_deleteOldEntries ( integer $before ) Deletes all log entries older than a certain date.
_log ( integer $action, string $message_id, string $recipient, boolean $success ) Logs an attempt to send a message per recipient.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters the driver needs.

__get() публичный Метод

public __get ( $name )

_deleteOldEntries() абстрактный защищенный Метод

Deletes all log entries older than a certain date.
abstract protected _deleteOldEntries ( integer $before )
$before integer Unix timestamp before that all log entries should be deleted.

_log() абстрактный защищенный Метод

Logs an attempt to send a message per recipient.
abstract protected _log ( integer $action, string $message_id, string $recipient, boolean $success )
$action integer Why the message was sent (IMP_Sentmail constant).
$message_id string The Message-ID.
$recipient string A message recipient.
$success boolean Whether the attempt was successful.

favouriteRecipients() абстрактный публичный Метод

Returns the favourite recipients.
abstract public favouriteRecipients ( integer $limit, mixed $filter = null ) : array
$limit integer Return this number of recipients.
$filter mixed A list of messages types that should be returned. Null returns all message types.
Результат array A list with the $limit most favourite recipients.

gc() публичный Метод

Garbage collect log entries.
public gc ( )

log() публичный Метод

Logs an attempt to send a message.
public log ( integer $action, string $message_id, string | array $recipients, boolean $success = true )
$action integer Why the message was sent (IMP_Sentmail constant).
$message_id string The Message-ID.
$recipients string | array The list of message recipients.
$success boolean Whether the attempt was successful.

numberOfRecipients() абстрактный публичный Метод

Returns the number of recipients within a certain time period.
abstract public numberOfRecipients ( integer $hours, boolean $user = false ) : integer
$hours integer Time period in hours.
$user boolean Return the number of recipients for the current user?
Результат integer The number of recipients in the given time period.

Описание свойств

$_params защищенное свойство

Hash containing configuration parameters.
protected array $_params
Результат array