Documentation

Swift_FileSpool extends Swift_ConfigurableSpool
in package

Stores Messages on the filesystem.

Tags
author

Fabien Potencier

author

Xavier De Cock xdecock@gmail.com

Table of Contents

$message_limit  : mixed
The maximum number of messages to send per flush
$path  : mixed
The spool directory
$retryLimit  : int
File WriteRetry Limit.
$time_limit  : mixed
The time limit per flush
__construct()  : mixed
Create a new FileSpool.
flushQueue()  : int
Sends messages using the given transport instance.
getMessageLimit()  : int
Gets the maximum number of messages to send per flush.
getTimeLimit()  : int
Gets the time limit (in seconds) per flush.
isStarted()  : bool
Tests if this Spool mechanism has started.
queueMessage()  : bool
Queues a message.
recover()  : mixed
Execute a recovery if for any reason a process is sending for too long.
setMessageLimit()  : mixed
Sets the maximum number of messages to send per flush.
setRetryLimit()  : mixed
Allow to manage the enqueuing retry limit.
setTimeLimit()  : mixed
Sets the time limit (in seconds) per flush.
start()  : mixed
Starts this Spool mechanism.
stop()  : mixed
Stops this Spool mechanism.
getRandomString()  : string
Returns a random string needed to generate a fileName for the queue.

Properties

$message_limit

The maximum number of messages to send per flush

private mixed $message_limit

$path

The spool directory

private mixed $path

$retryLimit

File WriteRetry Limit.

private int $retryLimit = 10

Methods

__construct()

Create a new FileSpool.

public __construct(string $path) : mixed
Parameters
$path : string
Tags
throws
Swift_IoException
Return values
mixed

flushQueue()

Sends messages using the given transport instance.

public flushQueue(Swift_Transport $transport[, array<string|int, string> &$failedRecipients = null ]) : int
Parameters
$transport : Swift_Transport

A transport instance

$failedRecipients : array<string|int, string> = null

An array of failures by-reference

Return values
int

The number of sent e-mail's

getMessageLimit()

Gets the maximum number of messages to send per flush.

public getMessageLimit() : int
Return values
int

The limit

getTimeLimit()

Gets the time limit (in seconds) per flush.

public getTimeLimit() : int
Return values
int

The limit

isStarted()

Tests if this Spool mechanism has started.

public isStarted() : bool
Return values
bool

recover()

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

public recover([int $timeout = 900 ]) : mixed
Parameters
$timeout : int = 900

in second Defaults is for very slow smtp responses

Return values
mixed

setMessageLimit()

Sets the maximum number of messages to send per flush.

public setMessageLimit(int $limit) : mixed
Parameters
$limit : int
Return values
mixed

setRetryLimit()

Allow to manage the enqueuing retry limit.

public setRetryLimit(int $limit) : mixed

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

Parameters
$limit : int
Return values
mixed

setTimeLimit()

Sets the time limit (in seconds) per flush.

public setTimeLimit(int $limit) : mixed
Parameters
$limit : int

The limit

Return values
mixed

start()

Starts this Spool mechanism.

public start() : mixed
Return values
mixed

stop()

Stops this Spool mechanism.

public stop() : mixed
Return values
mixed

getRandomString()

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

protected getRandomString(int $count) : string
Parameters
$count : int
Return values
string

Search results