XOOPS  2.6.0
ranks.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
27 
28 class XoopsRanks extends XoopsObject
29 {
33  public function __construct()
34  {
35  $this->initVar('rank_id', XOBJ_DTYPE_INT, null, false, 5);
36  $this->initVar('rank_title', XOBJ_DTYPE_TXTBOX, null, false);
37  $this->initVar('rank_min', XOBJ_DTYPE_INT, null, false, 8);
38  $this->initVar('rank_max', XOBJ_DTYPE_INT, null, false, 8);
39  $this->initVar('rank_special', XOBJ_DTYPE_INT, null, false, 1);
40  $this->initVar('rank_image', XOBJ_DTYPE_TXTBOX, null, false);
41  }
42 
50  public function id($format = 'n')
51  {
52  return $this->rank_id($format);
53  }
54 
62  public function rank_id($format = '')
63  {
64  return $this->getVar('rank_id', $format);
65  }
66 
74  public function rank_title($format = '')
75  {
76  return $this->getVar('rank_title', $format);
77  }
78 
86  public function rank_min($format = '')
87  {
88  return $this->getVar('rank_min', $format);
89  }
90 
98  public function rank_max($format = '')
99  {
100  return $this->getVar('rank_max', $format);
101  }
102 
110  public function rank_special($format = '')
111  {
112  return $this->getVar('rank_special', $format);
113  }
114 
122  public function rank_image($format = '')
123  {
124  return $this->getVar('rank_image', $format);
125  }
126 }
127 
129 {
130 
134  public function __construct(Connection $db)
135  {
136  parent::__construct($db, 'ranks', 'XoopsRanks', 'rank_id', 'rank_title');
137  }
138 }
id($format= 'n')
Definition: ranks.php:50
rank_image($format= '')
Definition: ranks.php:122
__construct()
Definition: ranks.php:33
getVar($key, $format= 's')
rank_id($format= '')
Definition: ranks.php:62
rank_title($format= '')
Definition: ranks.php:74
rank_max($format= '')
Definition: ranks.php:98
rank_min($format= '')
Definition: ranks.php:86
rank_special($format= '')
Definition: ranks.php:110
__construct(Connection $db)
Definition: ranks.php:134
initVar($key, $data_type, $value=null, $required=false, $maxlength=null, $options= '')