## Class TEmailLogRoute

Description

TEmailLogRoute class.

TEmailLogRoute sends selected log messages to email addresses. The target email addresses may be specified via Emails property. Optionally, you may set the email Subject and the SentFrom address.

- since: 3.0
- version: $Id: TLogRouter.php 2563 2008-11-11 10:03:41Z haertl.mike $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Util/TLogRouter.php (line 479)

    TComponent
       |
       --TApplicationComponent
          |
          --TLogRoute
             |
             --TEmailLogRoute

Class Constant Summary
DEFAULT_SUBJECT = 'Prado Application Log'
EMAIL_PATTERN = '/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/'
Method Summary
array getEmails ()
string getSentFrom ()
string getSubject ()
void init (TXmlElement $config)
void processLogs (array $logs)
array|string setEmails (mixed $emails)
void setSentFrom (string $value)
void setSubject (string $value)
Variables

#### Inherited Variables

Inherited from TLogRoute

> TLogRoute::$_levelNames
> TLogRoute::$_levelValues

Methods
getEmails (line 535)

- return: list of destination email addresses
- access: public

array getEmails ()
getSentFrom (line 581)

- return: send from address of the email
- access: public

string getSentFrom ()
getSubject (line 563)

- return: email subject. Defaults to TEmailLogRoute::DEFAULT_SUBJECT
- access: public

string getSubject ()
init (line 508)

Initializes the route.

- access: public
- throws: TConfigurationException if SentFrom is empty and 'sendmail_from' in php.ini is also empty.

void init (TXmlElement $config)

- TXmlElement $config: configurations specified in TLogRouter.

Redefinition of:

TLogRoute::init()
  Initializes the route.

processLogs (line 520)

Sends log messages to specified email addresses.

- access: protected

void processLogs (array $logs)

- array $logs: list of log messages

Redefinition of:

TLogRoute::processLogs()
  Processes log messages and sends them to specific destination.

setEmails (line 544)

- return: list of destination email addresses. If the value is a string, it is assumed to be comma-separated email addresses.
- access: public

array|string setEmails (mixed $emails)
setSentFrom (line 589)

- access: public

void setSentFrom (string $value)

- string $value: send from address of the email

setSubject (line 573)

- access: public

void setSubject (string $value)

- string $value: email subject.

#### Inherited Methods

Inherited From TLogRoute

> TLogRoute::collectLogs()
> TLogRoute::formatLogMessage()
> TLogRoute::getCategories()
> TLogRoute::getLevelName()
> TLogRoute::getLevels()
> TLogRoute::getLevelValue()
> TLogRoute::init()
> TLogRoute::processLogs()
> TLogRoute::setCategories()
> TLogRoute::setLevels()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants
DEFAULT_SUBJECT = 'Prado Application Log' (line 488)

Default email subject.

EMAIL_PATTERN = '/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/' (line 484)

Regex pattern for email address.

Documentation generated on Sun, 11 Jan 2009 20:23:05 -0500 by phpDocumentor 1.3.0RC4