Log
[ class tree: Log ] [ index: Log ] [ all elements ]

Source for file observer_mail.php

Documentation is available at observer_mail.php

  1. <?php
  2.  
  3. require_once 'Log/observer.php';
  4.  
  5. {
  6.     var $_to '';
  7.     var $_subject '';
  8.     var $_pattern '';
  9.  
  10.     function Log_observer_mail($priority$conf)
  11.     {
  12.         /* Call the base class constructor. */
  13.         $this->Log_observer($priority);
  14.  
  15.         /* Configure the observer. */
  16.         $this->_to $conf['to'];
  17.         $this->_subject $conf['subject'];
  18.         $this->_pattern $conf['pattern'];
  19.     }
  20.  
  21.     function notify($event)
  22.     {
  23.         if (preg_match($this->_pattern$event['message']!= 0{
  24.             mail($this->_to$this->_subject$event['message']);
  25.         }
  26.     }
  27. }
  28.  
  29. ?>

Documentation generated on Mon, 11 Mar 2019 16:02:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.