3
* $RCSfile: GalleryGroup.inc,v $
5
* Gallery - a web based photo album viewer and editor
6
* Copyright (C) 2000-2005 Bharat Mediratta
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.
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.
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.
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>
30
* Interface class for the GalleryGroup class.
31
* (Class schema version: 1.1)
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.
40
* @package GalleryCore
43
class GalleryGroup extends GalleryGroup_core {
46
* Return meta information about the members of this class
48
* @return array member => array(type, class)
50
function getPersistentMemberInfo() {
51
$meta = parent::getPersistentMemberInfo();
52
$meta['members']['groupType'] = array('class' => 'GalleryGroup', 'type' => STORAGE_TYPE_INTEGER);
54
$meta['members']['groupName'] = array('class' => 'GalleryGroup', 'type' => STORAGE_TYPE_STRING);
60
* Get the data from this persistent object as an associative array
62
* @return array memberName => memberValue
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;
72
* Return the name of this class with the proper mix of uppercase and
73
* lowercase (get_class() always returns lowercase)
75
* @return string class name
77
function getClassName() {
78
return 'GalleryGroup';
82
* Return the path to the PHP file for this class, relative to the gallery2 dir
86
function getClassFile() {
88
basename(dirname(dirname(dirname(__FILE__)))) .
89
'/classes/GalleryGroup.class';
93
* Get the value of groupType
95
* @return INTEGER the value
97
function getgroupType() {
98
if (!isset($this->_groupType)) {
101
return $this->_groupType;
105
* Set the value of groupType
107
* @param INTEGER the value
109
function setgroupType($value) {
110
/* Type cast the incoming value to be an integer */
111
if ($value != null) {
112
$value = (int)$value;
115
/* Convert unset values to null, to avoid generating warnings. */
116
$value = isset($value) ? $value : null;
118
$orig = isset($this->_groupType) ? $this->_groupType : null;
120
/* Only take action if the value actually changes */
121
if ($value !== $orig) {
122
$this->setModifiedFlag('groupType', $value);
123
$this->_groupType = $value;
128
* Get the value of groupName
130
* @return STRING the value
132
function getgroupName() {
133
if (!isset($this->_groupName)) {
136
return $this->_groupName;
140
* Set the value of groupName
142
* @param STRING the value
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;
150
/* Only take action if the value actually changes */
151
if ($value != $orig) {
152
$this->setModifiedFlag('groupName', $value);
153
$this->_groupName = $value;