[CS-Project-svn_notify] SF.net SVN: cs-project:[905] trunk/1.2/lib/notifier.class.php
Brought to you by:
crazedsanity
From: <cra...@us...> - 2008-08-26 00:43:13
|
Revision: 905 http://cs-project.svn.sourceforge.net/cs-project/?rev=905&view=rev Author: crazedsanity Date: 2008-08-26 00:43:08 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Removed unneeded notifier class... NOTE: after thinking about it, a special object for notifying just doesn't make sense based on the current setup. Removed Paths: ------------- trunk/1.2/lib/notifier.class.php Deleted: trunk/1.2/lib/notifier.class.php =================================================================== --- trunk/1.2/lib/notifier.class.php 2008-07-22 02:04:24 UTC (rev 904) +++ trunk/1.2/lib/notifier.class.php 2008-08-26 00:43:08 UTC (rev 905) @@ -1,58 +0,0 @@ -<?php - -/* - * Created on Jul 21, 2008 - * - * SVN INFORMATION::: - * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ - */ - - -class notifier { - - private $obj=NULL; - private $userList=array(); - private $userListMethod=NULL; - private $recordId=NULL; - - //========================================================================= - public function __construct($obj, $recordId, $userListMethod=NULL) { - if(!is_numeric($recordId) || $recordId < 1) { - throw new exception(__METHOD__ .": invalid record id (". $recordId .")"); - } - if(!strlen($userListMethod)) { - $userListMethod = 'get_user_list'; - } - $this->userListMethod = $userListMethod; - if(is_object($obj)) { - if(!method_exists($obj, $this->userListMethod)) { - throw new exception(__METHOD__ .": method to pull list of users (". $this->userListMethod .") missing"); - } - $this->obj = $obj; - } - else { - throw new exception(__METHOD__ .": invalid data for object (". $obj .")"); - } - }//end __construct() - //========================================================================= - - - //========================================================================= - public function send_notice($subject, $bodyTemplate, array $parseArr=NULL) { - $userListMethod = $this->userListMethod; - $userList = $this->obj->$userListMethod($this->recordId); - - $retval = send_email($userList, $subject, $bodyTemplate, $parseArr); - - return($retval); - }//end send_notice() - //========================================================================= - -}//end notifier{} - -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |