Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Mail_Queue_Container_flatfile Class Reference
Inheritance diagram for Mail_Queue_Container_flatfile:

Public Member Functions

 Mail_Queue_Container_flatfile ($options)
 
 _preload ()
 
 list_files ($dir)
 
 put ($time_to_send, $id_user, $ip, $sender, $recipient, $headers, $body, $delete_after_send=true)
 
 loadFromQueue ($id)
 
 saveToQueue ($id, $contents)
 
 countSend ($mail)
 
 setAsSent ($mail)
 
 deleteMail ($id)
 

Data Fields

 $dir
 

Detailed Description

Definition at line 29 of file flatfile.php.

Member Function Documentation

_preload ( )

Preload mail to queue.

Returns
mixed True on success else Mail_Queue_Error object. private

Definition at line 67 of file flatfile.php.

countSend (   $mail)

Check how many times mail was sent.

Parameters
objectMail_Queue_Body
Returns
mixed Integer or Mail_Queue_Error class if error. public

Definition at line 230 of file flatfile.php.

deleteMail (   $id)

Remove from queue mail with $id identifier.

Parameters
integer$idMail ID
Returns
bool True on success else Mail_Queue_Error class

public

Definition at line 281 of file flatfile.php.

list_files (   $dir)

List all the filename of files in a particular directory

Parameters
stringThe directory to look for files
Returns
array A numerically indexed array of filenames private

Definition at line 110 of file flatfile.php.

loadFromQueue (   $id)

Load the mail data from the file system queue

Parameters
intMailID of the data we are trying to load
Returns
array The result of including the file if it exists, or an empty array private

Definition at line 198 of file flatfile.php.

Contructor

Mail_Queue_Container_flatfile:: Mail_Queue_Container_flatfile()

Parameters
mixed$optionsAn associative array of option names and their values. For now, just 'dir'.

public

Definition at line 49 of file flatfile.php.

put (   $time_to_send,
  $id_user,
  $ip,
  $sender,
  $recipient,
  $headers,
  $body,
  $delete_after_send = true 
)

Put new mail in queue and save in database.

Mail_Queue_Container::put()

Parameters
string$time_to_sendWhen mail have to be send
integer$id_userSender id
string$ipSender ip
string$fromSender e-mail
string$toReciepient e-mail
string$hdrsMail headers (in RFC)
string$bodyMail body (in RFC)
bool$delete_after_sendDelete or not mail from filesystem after send
Returns
mixed ID of the record where this mail has been put or Mail_Queue_Error on error public

Definition at line 148 of file flatfile.php.

saveToQueue (   $id,
  $contents 
)

Save the mail data to a single file so it can be included later.

Parameters
intMailID of the data we are trying to load
arrayArray of data to save
Returns
int The result of fwrite()ing the file private

Definition at line 214 of file flatfile.php.

setAsSent (   $mail)

Set mail as already sent.

Parameters
objectMail_Queue_Body object
Returns
bool public

Definition at line 255 of file flatfile.php.


The documentation for this class was generated from the following file: