Revision 795,
655 bytes
checked in by viani, 15 years ago
(diff) |
Ticket #488 - Inclusão do módulo workflow no ramo trunk do repositório Expresso.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[795] | 1 | <?php |
---|
| 2 | |
---|
| 3 | require_once 'Log/observer.php'; |
---|
| 4 | |
---|
| 5 | class Log_observer_mail extends Log_observer |
---|
| 6 | { |
---|
| 7 | var $_to = ''; |
---|
| 8 | var $_subject = ''; |
---|
| 9 | var $_pattern = ''; |
---|
| 10 | |
---|
| 11 | function Log_observer_mail($priority, $conf) |
---|
| 12 | { |
---|
| 13 | /* Call the base class constructor. */ |
---|
| 14 | $this->Log_observer($priority); |
---|
| 15 | |
---|
| 16 | /* Configure the observer. */ |
---|
| 17 | $this->_to = $conf['to']; |
---|
| 18 | $this->_subject = $conf['subject']; |
---|
| 19 | $this->_pattern = $conf['pattern']; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | function notify($event) |
---|
| 23 | { |
---|
| 24 | if (preg_match($this->_pattern, $event['message']) != 0) { |
---|
| 25 | mail($this->_to, $this->_subject, $event['message']); |
---|
| 26 | } |
---|
| 27 | } |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.