source: branches/1.2/contactcenter/inc/class.so_suffix.inc.php @ 2

Revision 2, 2.9 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2  /***************************************************************************\
3  * eGroupWare - Contacts Center                                              *
4  * http://www.egroupware.org                                                 *
5  *                                                                           *
6  * Storage Object Classes                                                    *
7  * Written by:                                                               *
8  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
9  *  sponsored by Thyamad - http://www.thyamad.com                            *
10  * ------------------------------------------------------------------------- *
11  *  This program is free software; you can redistribute it and/or modify it  *
12  *  under the terms of the GNU General Public License as published by the    *
13  *  Free Software Foundation; either version 2 of the License, or (at your   *
14  *  option) any later version.                                               *
15  \***************************************************************************/
16
17
18        include_once( "class.so_main.inc.php" );
19       
20        class so_suffix extends so_main
21        {
22       
23                function so_suffix ( $id = false )
24                {
25                        $this->init();
26                               
27                        $this->main_fields = array(
28                                'id_suffix' => array(
29                                        'name'  => 'id_suffix',
30                                        'type'  => 'primary',
31                                        'state' => 'empty',
32                                        'value' => &$this->id
33                                ),
34                                'suffix' => array(
35                                        'name'  => 'suffix',
36                                        'type'  => false,
37                                        'state' => 'empty',
38                                        'value' => false
39                                )
40                        );
41
42                        $this->db_tables = array(
43                                'phpgw_cc_suffixes' => array(
44                                        'type'   => 'main',
45                                        'keys'   => array(
46                                                'primary' => array(&$this->main_fields['id_suffix']),
47                                                'foreign' => false
48                                        ),
49                                        'fields' => & $this->main_fields
50                                )
51                        );
52
53                        if ($id)
54                        {
55                                $this->id = $id;
56                                if (!$this->checkout($id))
57                                {
58                                        $this->state = 'new';
59                                }
60                        }
61                        else
62                        {
63                                $this->state = 'new';
64                        }
65                }
66               
67       
68                /*********************************************************************\
69                 *                   Methods to Get Information                      *
70                \*********************************************************************/
71               
72                /*!
73               
74                        @function get_suffix
75                        @abstract Returns the Sulfix
76                        @author Raphael Derosso Pereira
77               
78                */
79                function get_suffix (  )
80                {
81                        return $this->main_fields['suffix']['value'];
82                }
83       
84       
85
86                /*********************************************************************\
87                 *                   Methods to Get Information                      *
88                \*********************************************************************/
89               
90                /*!
91               
92                        @function set_suffix
93                        @abstract Sets the Sulfix
94                        @author Raphael Derosso Pereira
95                       
96                        @param string $suffix The Sulfix
97               
98                */
99                function set_suffix ( $suffix )
100                {
101                        $this->main_fields['suffix']['value'] = $suffix;
102                        $this->manage_fields($this->main_fields['suffix'], 'changed');
103                }
104       
105        }
106?>
Note: See TracBrowser for help on using the repository browser.