~ubuntu-branches/ubuntu/hardy/gallery2/hardy-security

« back to all changes in this revision

Viewing changes to modules/core/classes/interfaces/GalleryGroup.inc

  • Committer: Bazaar Package Importer
  • Author(s): Michael C. Schultheiss
  • Date: 2006-04-16 16:42:35 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060416164235-8uy0u4bfjdxpge2o
Tags: 2.1.1-1
* New upstream release (Closes: #362936)
  + Bugfixes for Postgres7 (Closes: #359000, #362152)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * $RCSfile: GalleryGroup.inc,v $
4
 
 *
5
 
 * Gallery - a web based photo album viewer and editor
6
 
 * Copyright (C) 2000-2005 Bharat Mediratta
7
 
 * 
8
 
 * This program is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License as published by
10
 
 * the Free Software Foundation; either version 2 of the License, or (at
11
 
 * your option) any later version.
12
 
 * 
13
 
 * This program is distributed in the hope that it will be useful, but
14
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
 * General Public License for more details.
17
 
 * 
18
 
 * You should have received a copy of the GNU General Public License
19
 
 * along with this program; if not, write to the Free Software
20
 
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
21
 
 */
22
 
/**
23
 
 * @package GalleryCore
24
 
 * @subpackage ClassInterfaces
25
 
 * @version $Revision: 1.39 $ $Date: 2005/08/23 03:49:04 $
26
 
 * @author Bharat Mediratta <bharat@menalto.com>
27
 
 */
28
 
 
29
 
/**
30
 
 * Interface class for the GalleryGroup class.
31
 
 * (Class schema version: 1.1)
32
 
 *
33
 
 * This file is automatically generated from XML embedded in the
34
 
 * class, combined with the ClassCode.xsl file.  You should not modify
35
 
 * it by hand, as your changes will be lost next time this file is
36
 
 * rebuilt.  If you want to add more getters/setters, you should add
37
 
 * them in the core class.  If you want to change the format of this
38
 
 * file, then you should edit the XSL template.
39
 
 *
40
 
 * @package GalleryCore
41
 
 * @subpackage Classes
42
 
 */
43
 
class GalleryGroup extends GalleryGroup_core {
44
 
  
45
 
    /**
46
 
     * Return meta information about the members of this class
47
 
     *
48
 
     * @return array member => array(type, class)
49
 
     */
50
 
    function getPersistentMemberInfo() {
51
 
        $meta = parent::getPersistentMemberInfo();
52
 
        $meta['members']['groupType'] = array('class' => 'GalleryGroup', 'type' => STORAGE_TYPE_INTEGER);
53
 
    
54
 
        $meta['members']['groupName'] = array('class' => 'GalleryGroup', 'type' => STORAGE_TYPE_STRING);
55
 
    
56
 
        return $meta;
57
 
    }
58
 
 
59
 
    /**
60
 
     * Get the data from this persistent object as an associative array
61
 
     *
62
 
     * @return array memberName => memberValue
63
 
     */
64
 
    function getMemberData() {
65
 
        $data = parent::getMemberData();
66
 
        $data['groupType'] = isset($this->_groupType) ? $this->_groupType : null;
67
 
        $data['groupName'] = isset($this->_groupName) ? $this->_groupName : null;
68
 
        return $data;
69
 
    }
70
 
  
71
 
    /**
72
 
     * Return the name of this class with the proper mix of uppercase and
73
 
     * lowercase (get_class() always returns lowercase)
74
 
     *
75
 
     * @return string class name
76
 
     */
77
 
    function getClassName() {
78
 
        return 'GalleryGroup';
79
 
    }
80
 
 
81
 
    /** 
82
 
     * Return the path to the PHP file for this class, relative to the gallery2 dir
83
 
     * 
84
 
     * @return string path
85
 
     */ 
86
 
    function getClassFile() { 
87
 
        return 'modules/' .  
88
 
            basename(dirname(dirname(dirname(__FILE__)))) .  
89
 
            '/classes/GalleryGroup.class'; 
90
 
    }
91
 
    
92
 
    /**
93
 
     * Get the value of groupType
94
 
     *
95
 
     * @return INTEGER the value
96
 
     */
97
 
    function getgroupType() {
98
 
        if (!isset($this->_groupType)) {
99
 
            return null;
100
 
        }
101
 
        return $this->_groupType;
102
 
    }
103
 
 
104
 
    /**
105
 
     * Set the value of groupType
106
 
     *
107
 
     * @param INTEGER the value
108
 
     */
109
 
    function setgroupType($value) {
110
 
        /* Type cast the incoming value to be an integer */
111
 
        if ($value != null) {
112
 
            $value = (int)$value;
113
 
        }
114
 
        
115
 
        /* Convert unset values to null, to avoid generating warnings. */
116
 
        $value = isset($value) ? $value : null;
117
 
      
118
 
        $orig = isset($this->_groupType) ? $this->_groupType : null;
119
 
 
120
 
        /* Only take action if the value actually changes */
121
 
        if ($value !== $orig) {
122
 
            $this->setModifiedFlag('groupType', $value);
123
 
            $this->_groupType = $value;
124
 
        }
125
 
    }
126
 
  
127
 
    /**
128
 
     * Get the value of groupName
129
 
     *
130
 
     * @return STRING the value
131
 
     */
132
 
    function getgroupName() {
133
 
        if (!isset($this->_groupName)) {
134
 
            return null;
135
 
        }
136
 
        return $this->_groupName;
137
 
    }
138
 
 
139
 
    /**
140
 
     * Set the value of groupName
141
 
     *
142
 
     * @param STRING the value
143
 
     */
144
 
    function setgroupName($value) {
145
 
        /* Convert unset values to null, to avoid generating warnings. */
146
 
        $value = isset($value) ? $value : null;
147
 
        $value = $this->_truncateString($value, 128);
148
 
        $orig = isset($this->_groupName) ? $this->_groupName : null;
149
 
 
150
 
        /* Only take action if the value actually changes */
151
 
        if ($value != $orig) {
152
 
            $this->setModifiedFlag('groupName', $value);
153
 
            $this->_groupName = $value;
154
 
        }
155
 
    }
156
 
  
157
 
}
158
 
?>