[ Index ]
 

Code source de SPIP Agora 1.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Pear/Log/ -> mail.php (sommaire)

$Header: /repository/pear/Log/Log/mail.php,v 1.21 2004/01/19 08:02:40 jon Exp $

Version: $Revision: 1.21 $
Poids: 222 lignes (6 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Log_mail:: (6 méthodes):
  Log_mail()
  _Log_mail()
  open()
  close()
  flush()
  log()


Classe: Log_mail  - X-Ref

The Log_mail class is a concrete implementation of the Log:: abstract class
which sends log messages to a mailbox.
The mail is actually sent when you close() the logger, or when the destructor
is called (when the script is terminated).

PLEASE NOTE that you must create a Log_mail object using =&, like this :
$logger =& Log::factory("mail", "recipient@example.com", ...)

This is a PEAR requirement for destructors to work properly.
See http://pear.php.net/manual/en/class.pear.php

Log_mail($name, $ident = '', $conf = array()   X-Ref
Constructs a new Log_mail object.

Here is how you can customize the mail driver with the conf[] hash :
$conf['from']    : the mail's "From" header line,
$conf['subject'] : the mail's "Subject" line.

param: string $name      The filename of the logfile.
param: string $ident     The identity string.
param: array  $conf      The configuration array.
param: int    $level     Log messages up to and including this level.

_Log_mail()   X-Ref
Destructor. Calls close().


open()   X-Ref
Starts a new mail message.
This is implicitly called by log(), if necessary.


close()   X-Ref
Closes the message, if it is open, and sends the mail.
This is implicitly called by the destructor, if necessary.


flush()   X-Ref
Flushes the log output by forcing the email message to be sent now.
Events that are logged after flush() is called will be appended to a
new email message.


log($message, $priority = null)   X-Ref
Writes $message to the currently open mail message.
Calls open(), if necessary.

param: mixed  $message  String or object containing the message to log.
param: string $priority The priority of the message.  Valid
return: boolean  True on success or false on failure.



Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7