2010-11-12 22:39:45 +00:00
|
|
|
<?php
|
2010-11-30 12:23:46 +00:00
|
|
|
/**
|
|
|
|
* Abstract class of notifation system
|
|
|
|
*
|
|
|
|
* @category DMS
|
2013-02-14 11:10:53 +00:00
|
|
|
* @package SeedDMS
|
2010-11-30 12:23:46 +00:00
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
2010-11-12 22:39:45 +00:00
|
|
|
|
2010-11-30 12:23:46 +00:00
|
|
|
/**
|
|
|
|
* Abstract class of notification systems
|
|
|
|
*
|
|
|
|
* @category DMS
|
2013-02-14 11:10:53 +00:00
|
|
|
* @package SeedDMS
|
2010-11-30 12:23:46 +00:00
|
|
|
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
2013-02-14 11:10:53 +00:00
|
|
|
abstract class SeedDMS_Notify {
|
2010-11-12 22:39:45 +00:00
|
|
|
/* User sending the notification
|
|
|
|
* Will only be used if the sender of one of the notify methods
|
|
|
|
* is not set
|
|
|
|
*/
|
|
|
|
protected $sender;
|
|
|
|
|
2013-04-08 18:48:07 +00:00
|
|
|
abstract function toIndividual($sender, $recipient, $subject, $message, $params=array());
|
|
|
|
abstract function toGroup($sender, $groupRecipient, $subject, $message, $params=array());
|
|
|
|
abstract function toList($sender, $recipients, $subject, $message, $params=array());
|
2010-11-12 22:39:45 +00:00
|
|
|
|
|
|
|
function replaceMarker($text) {
|
|
|
|
global $settings;
|
|
|
|
|
|
|
|
return(str_replace(
|
|
|
|
array('###SITENAME###', '###HTTP_ROOT###', '###URL_PREFIX###'),
|
|
|
|
array($settings->_siteName, $settings->_httpRoot, "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot),
|
|
|
|
$text));
|
|
|
|
}
|
|
|
|
|
|
|
|
function setSender($user) {
|
|
|
|
$this->sender = $user;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|