Public Member Functions | Protected Member Functions

Robo47_Mail_Transport_Log Class Reference

List of all members.

Public Member Functions

 __construct ($formatter, Zend_Log $log, $logPriority=Zend_Log::INFO, $logCategory= 'mail')
 getFormatter ()
 Get Formatter.
 getLog ()
 Get Log.
 getLogCategory ()
 Get Log Category.
 getLogPriority ()
 Get Log Category.
 send (Zend_Mail $mail)
 Logs the Mail.
 setFormatter ($formatter)
 Set Formatter.
 setLog (Zend_Log $log=null)
 Set Log.
 setLogCategory ($logCategory)
 Set Log Category.
 setLogPriority ($logPriority)
 Set Log Category.

Protected Member Functions

 _sendMail ()
 Not Really needed ...

Detailed Description

Definition at line 31 of file Log.php.


Constructor & Destructor Documentation

Robo47_Mail_Transport_Log::__construct ( formatter,
Zend_Log $  log,
logPriority = Zend_Log::INFO,
logCategory = 'mail' 
)
Parameters:
Robo47_Mail_Transport_Log_Formatter_Interface|string $formatter
Zend_Log $log
integer $logPriority
string $logCategory

Definition at line 41 of file Log.php.

References setFormatter(), setLog(), setLogCategory(), and setLogPriority().

    {
        $this->setFormatter($formatter);
        $this->setLog($log);
        $this->setLogPriority($logPriority);
        $this->setLogCategory($logCategory);
    }

Here is the call graph for this function:


Member Function Documentation

Robo47_Mail_Transport_Log::_sendMail (  )  [protected]

Not Really needed ...

empty just to fullfil the requirements of the parent class

Definition at line 164 of file Log.php.

    {
        
    }

Robo47_Mail_Transport_Log::getFormatter (  ) 

Get Formatter.

Returns:
Robo47_Mail_Transport_Log_Formatter_Interface

Definition at line 142 of file Log.php.

Referenced by send().

    {
        return $this->_formatter;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::getLog (  ) 

Get Log.

Returns:
Robo47_Log

Definition at line 68 of file Log.php.

Referenced by send().

    {
        return $this->_log;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::getLogCategory (  ) 

Get Log Category.

Returns:
string

Definition at line 90 of file Log.php.

Referenced by send().

    {
        return $this->_logCategory;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::getLogPriority (  ) 

Get Log Category.

Returns:
integer

Definition at line 112 of file Log.php.

Referenced by send().

    {
        return $this->_logPriority;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::send ( Zend_Mail $  mail  ) 

Logs the Mail.

Parameters:
Zend_Mail $mail

Definition at line 152 of file Log.php.

References getFormatter(), getLog(), getLogCategory(), and getLogPriority().

    {
        $message = $this->getFormatter()->format($mail);
        $category = array('category' => $this->getLogCategory());
        $priority = $this->getLogPriority();
        $this->getLog()->log($message, $priority, $category);
    }

Here is the call graph for this function:

Robo47_Mail_Transport_Log::setFormatter ( formatter  ) 

Set Formatter.

Parameters:
Robo47_Mail_Transport_Log_Formatter_Interface|string $formatter
Returns:
Robo47_Mail_Transport_Log *Provides Fluent Interface*

Definition at line 123 of file Log.php.

Referenced by __construct().

    {
        if (is_string($formatter)) {
            $formatter = new $formatter;
        }
        if (!$formatter instanceof Robo47_Mail_Transport_Log_Formatter_Interface) {
            $message = 'formatter is not instance of ' .
                'Robo47_Mail_Transport_Log_Formatter_Interface';
            throw new Robo47_Mail_Transport_Exception($message);
        }
        $this->_formatter = $formatter;
        return $this;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::setLog ( Zend_Log $  log = null  ) 

Set Log.

Parameters:
Zend_Log $log
Returns:
Robo47_Mail_Transport_Log *Provides Fluent Interface*

Definition at line 57 of file Log.php.

Referenced by __construct().

    {
        $this->_log = $log;
        return $this;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::setLogCategory ( logCategory  ) 

Set Log Category.

Parameters:
string $category
Returns:
Robo47_Mail_Transport_Log *Provides Fluent Interface*

Definition at line 79 of file Log.php.

Referenced by __construct().

    {
        $this->_logCategory = $logCategory;
        return $this;
    }

Here is the caller graph for this function:

Robo47_Mail_Transport_Log::setLogPriority ( logPriority  ) 

Set Log Category.

Parameters:
integer $logPriority
Returns:
Robo47_Mail_Transport_Log *Provides Fluent Interface*

Definition at line 101 of file Log.php.

Referenced by __construct().

    {
        $this->_logPriority = (int) $logPriority;
        return $this;
    }

Here is the caller graph for this function:


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