PHP Класс Swift_FileSpool

Автор: Fabien Potencier
Наследование: implements Swift_Spool
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $path ) Create a new FileSpool.
flushQueue ( Swift_Transport $transport, string[] &$failedRecipients = null ) : integer Sends messages using the given transport instance.
isStarted ( ) : boolean Tests if this Spool mechanism has started.
queueMessage ( Swift_Mime_Message $message ) : boolean Queues a message.
recover ( integer $timeout = 900 ) Execute a recovery if for any reason a process is sending for too long.
setRetryLimit ( integer $limit ) Allow to manage the enqueuing retry limit.
start ( ) Starts this Spool mechanism.
stop ( ) Stops this Spool mechanism.

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

Метод Описание
getRandomString ( integer $count ) : string Returns a random string needed to generate a fileName for the queue.

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

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

Create a new FileSpool.
public __construct ( string $path )
$path string

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

Sends messages using the given transport instance.
public flushQueue ( Swift_Transport $transport, string[] &$failedRecipients = null ) : integer
$transport Swift_Transport A transport instance
$failedRecipients string[] An array of failures by-reference
Результат integer The number of sent e-mail's

getRandomString() защищенный Метод

Returns a random string needed to generate a fileName for the queue.
protected getRandomString ( integer $count ) : string
$count integer
Результат string

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

Tests if this Spool mechanism has started.
public isStarted ( ) : boolean
Результат boolean

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

Queues a message.
public queueMessage ( Swift_Mime_Message $message ) : boolean
$message Swift_Mime_Message The message to store
Результат boolean

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

Execute a recovery if for any reason a process is sending for too long.
public recover ( integer $timeout = 900 )
$timeout integer in second Defaults is for very slow smtp responses

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

Default, is ten and allows over 64^20 different fileNames
public setRetryLimit ( integer $limit )
$limit integer

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

Starts this Spool mechanism.
public start ( )

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

Stops this Spool mechanism.
public stop ( )