## 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 2415 2008-03-24 20:39:47Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

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

    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 520)

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

array getEmails ()
getSentFrom (line 566)

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

string getSentFrom ()
getSubject (line 548)

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

string getSubject ()
init (line 494)

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 506)

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 529)

- 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 574)

- access: public

void setSentFrom (string $value)

- string $value: send from address of the email

setSubject (line 558)

- 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 474)

Default email subject.

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

Regex pattern for email address.

Documentation generated on Mon, 21 Apr 2008 11:35:33 -0400 by phpDocumentor 1.3.0RC4