TYPO3  7.6
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Swift_FileSpool Class Reference
Inheritance diagram for Swift_FileSpool:
Swift_ConfigurableSpool Swift_Spool

Public Member Functions

 __construct ($path)
 
 isStarted ()
 
 start ()
 
 stop ()
 
 setRetryLimit ($limit)
 
 queueMessage (Swift_Mime_Message $message)
 
 recover ($timeout=900)
 
 flushQueue (Swift_Transport $transport, &$failedRecipients=null)
 
- Public Member Functions inherited from Swift_ConfigurableSpool
 setMessageLimit ($limit)
 
 getMessageLimit ()
 
 setTimeLimit ($limit)
 
 getTimeLimit ()
 

Protected Member Functions

 getRandomString ($count)
 

Private Attributes

 $_path
 
 $_retryLimit = 10
 

Detailed Description

Stores Messages on the filesystem.

Author
Fabien Potencier
Xavier De Cock xdeco.nosp@m.ck@g.nosp@m.mail..nosp@m.com

Definition at line 17 of file FileSpool.php.

Constructor & Destructor Documentation

__construct (   $path)

Create a new FileSpool.

Parameters
string$path
Exceptions
Swift_IoException

Definition at line 36 of file FileSpool.php.

Member Function Documentation

flushQueue ( Swift_Transport  $transport,
$failedRecipients = null 
)

Sends messages using the given transport instance.

Parameters
Swift_Transport$transportA transport instance
string[]$failedRecipients An array of failures by-reference
Returns
int The number of sent e-mail's

Implements Swift_Spool.

Definition at line 141 of file FileSpool.php.

References Swift_ConfigurableSpool\getMessageLimit(), Swift_ConfigurableSpool\getTimeLimit(), Swift_Transport\isStarted(), Swift_Transport\send(), and Swift_Transport\start().

getRandomString (   $count)
protected

Returns a random string needed to generate a fileName for the queue.

Parameters
int$count
Returns
string

Definition at line 196 of file FileSpool.php.

Referenced by queueMessage().

isStarted ( )

Tests if this Spool mechanism has started.

Returns
bool

Implements Swift_Spool.

Definition at line 52 of file FileSpool.php.

queueMessage ( Swift_Mime_Message  $message)

Queues a message.

Parameters
Swift_Mime_Message$messageThe message to store
Exceptions
Swift_IoException
Returns
bool

Implements Swift_Spool.

Definition at line 92 of file FileSpool.php.

References $_retryLimit, and getRandomString().

recover (   $timeout = 900)

Execute a recovery if for any reason a process is sending for too long.

Parameters
int$timeoutin second Defaults is for very slow smtp responses

Definition at line 119 of file FileSpool.php.

setRetryLimit (   $limit)

Allow to manage the enqueuing retry limit.

Default, is ten and allows over 64^20 different fileNames

Parameters
int$limit

Definition at line 78 of file FileSpool.php.

start ( )

Starts this Spool mechanism.

Implements Swift_Spool.

Definition at line 60 of file FileSpool.php.

stop ( )

Stops this Spool mechanism.

Implements Swift_Spool.

Definition at line 67 of file FileSpool.php.

Member Data Documentation

$_path
private

The spool directory

Definition at line 20 of file FileSpool.php.

$_retryLimit = 10
private

Definition at line 27 of file FileSpool.php.

Referenced by queueMessage().