source: branches/1.2/workflow/inc/class.so_agent_mail_smtp.inc.php @ 1349

Revision 1349, 2.2 KB checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1<?php
2/**************************************************************************\
3* eGroupWare - Workflow Agent's SO-layer (storage-object)                  *
4* http://www.egroupware.org                                                *
5* (c) 2005 by Regis leroy <regis.leroy@glconseil.com>                      *
6* --------------------------------------------                             *
7*  This program is free software; you can redistribute it and/or modify it *
8*  under the terms of the GNU General Public License as published by the   *
9*  Free Software Foundation; either version 2 of the License, or (at your  *
10*  option) any later version.                                              *
11\**************************************************************************/
12
13require_once(dirname(__FILE__) . SEP . 'class.so_agent.inc.php');
14
15/**
16 * Class to store/read all agents data
17 *
18 * Creation and deletion of agents records are done by the workflow engine, not
19 * by this class and her childs.
20 *
21 * @package Workflow
22 * @author regis.leroy@glconseil.com
23 * @license http://www.gnu.org/copyleft/gpl.html GPL
24 */
25class so_agent_mail_smtp extends so_agent
26{
27         /**
28          * Constructor of the so_agent class
29          *
30          * @return object
31          * @access public
32          */
33        function so_agent_mail_smtp()
34        {
35                parent::so_agent();
36                $this->agent_table = $this->wf_table.'mail_smtp';
37        }
38       
39        /**
40         * Read all agent datas from the database
41         * @param $agent_id int id of the entry to read
42         * @return mixed array/boolean array with column => value pairs or false if entry not found
43         */
44        function read($agent_id)
45        {
46                //perform the query
47                $this->db->select($this->agent_table,'*',array('wf_agent_id'=>$agent_id),__LINE__,__FILE__, 'workflow');
48               
49                while (($row = $this->db->row(true)))
50                {
51                        return $row;
52                }
53
54                return false;
55        }
56
57        /**
58         * @abstract save all agent datas to the database
59         * @param $agent_id int id of the entry to save
60         * @param $datas is an array containing columns => value pairs which will be saved for this agent
61         * @return bool true if everything was ok, false else
62         */
63        function save($agent_id, &$datas)
64        {
65                $this->db->update($this->agent_table,$datas,array('wf_agent_id'=>$agent_id),__LINE__,__FILE__, 'workflow');
66                return false;
67        }
68}
Note: See TracBrowser for help on using the repository browser.