PHP Class Swift_FileSpool

Author: Fabien Potencier
Inheritance: implements Swift_Spool
Afficher le fichier Open project: swiftmailer/swiftmailer Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
getRandomString ( integer $count ) : string Returns a random string needed to generate a fileName for the queue.

Method Details

__construct() public méthode

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

flushQueue() public méthode

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
Résultat integer The number of sent e-mail's

getRandomString() protected méthode

Returns a random string needed to generate a fileName for the queue.
protected getRandomString ( integer $count ) : string
$count integer
Résultat string

isStarted() public méthode

Tests if this Spool mechanism has started.
public isStarted ( ) : boolean
Résultat boolean

queueMessage() public méthode

Queues a message.
public queueMessage ( Swift_Mime_Message $message ) : boolean
$message Swift_Mime_Message The message to store
Résultat boolean

recover() public méthode

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() public méthode

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

start() public méthode

Starts this Spool mechanism.
public start ( )

stop() public méthode

Stops this Spool mechanism.
public stop ( )