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.

  • author: Qiang Xue <qiang.xue@gmail.com>
  • version: $Id: TLogRouter.php 2996 2011-06-20 15:24:57Z ctrlaltca@gmail.com $
  • since: 3.0

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

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 ( $emails)
void setSentFrom (string $value)
void setSubject (string $value)
Variables

Inherited Variables

Inherited from TLogRoute

TLogRoute::$_levelNames
TLogRoute::$_levelValues
Methods
getEmails (line 566)
  • return: list of destination email addresses
  • access: public
array getEmails ()
getSentFrom (line 612)
  • return: send from address of the email
  • access: public
string getSentFrom ()
getSubject (line 594)
  • return: email subject. Defaults to TEmailLogRoute::DEFAULT_SUBJECT
  • access: public
string getSubject ()
init (line 539)

Initializes the route.

  • throws: TConfigurationException if SentFrom is empty and 'sendmail_from' in php.ini is also empty.
  • access: public
void init (TXmlElement $config)

Redefinition of:
TLogRoute::init()
Initializes the route.
processLogs (line 551)

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 575)
  • 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 ( $emails)
  • $emails
setSentFrom (line 620)
  • access: public
void setSentFrom (string $value)
  • string $value: send from address of the email
setSubject (line 604)
  • 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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()
Class Constants
DEFAULT_SUBJECT = 'Prado Application Log' (line 519)

Default email subject.

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

Regex pattern for email address.

Documentation generated on Mon, 25 Jun 2012 14:38:40 +0200 by phpDocumentor 1.4.3