Class IDS_Log_Email

Description

Implements interfaces:

Email logging wrapper

The Email wrapper is designed to send reports via email. It implements the singleton pattern.

Located in /Log/Email.php (line 52)


	
			
Method Summary
static object getInstance (mixed $config)
void __construct (mixed $config)
boolean execute (IDS_Report $data)
boolean isSpamAttempt ()
string prepareData (mixed $data)
boolean send (string $address, string $data, string $headers, [string $envelope = null])
Methods
static method getInstance (line 182)

Returns an instance of this class

This method allows the passed argument to be either an instance of IDS_Init or an array.

  • access: public
static object getInstance (mixed $config)
  • mixed $config: IDS_Init | array
Constructor __construct (line 146)

Constructor

  • access: protected
void __construct (mixed $config)
  • mixed $config: IDS_Init instance | array
execute (line 316)

Sends the report to registered recipients

  • throws: Exception if data is no string
  • access: public
boolean execute (IDS_Report $data)
  • object $data: IDS_Report instance

Implementation of:
IDS_Log_Interface::execute()
Interface method
isSpamAttempt (line 210)

Detects spam attempts

To avoid mail spam through this logging class this function is used to detect such attempts based on the alert frequency.

  • access: protected
boolean isSpamAttempt ()
prepareData (line 270)

Prepares data

Converts given data into a format that can be read in an email. You might edit this method to your requirements.

  • access: protected
string prepareData (mixed $data)
  • mixed $data: the report data
send (line 385)

Sends an email

  • access: protected
boolean send (string $address, string $data, string $headers, [string $envelope = null])
  • string $address: email address
  • string $data: the report data
  • string $headers: the mail headers
  • string $envelope: the optional envelope string

Documentation generated on Mon, 22 Dec 2008 13:36:43 +0100 by phpDocumentor 1.4.2