Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2775 rexy 1
<?php
2
/**
3
 * MBInfo TO class
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PSI_TO
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2009 phpSysInfo
11
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
12
 * @version   SVN: $Id: class.MBInfo.inc.php 253 2009-06-17 13:07:50Z bigmichi1 $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * MBInfo TO class
17
 *
18
 * @category  PHP
19
 * @package   PSI_TO
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
21
 * @copyright 2009 phpSysInfo
22
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
23
 * @version   Release: 3.0
24
 * @link      http://phpsysinfo.sourceforge.net
25
 */
26
class MBInfo
27
{
28
    /**
29
     * array with SensorDevices for temperatures
30
     *
31
     * @see SensorDevice
32
     *
33
     * @var array
34
     */
35
    private $_mbTemp = array();
36
 
37
    /**
38
     * array with SensorDevices for fans
39
     *
40
     * @see SensorDevice
41
     *
42
     * @var array
43
     */
44
    private $_mbFan = array();
45
 
46
    /**
47
     * array with SensorDevices for voltages
48
     *
49
     * @see SensorDevice
50
     *
51
     * @var array
52
     */
53
    private $_mbVolt = array();
54
 
55
    /**
56
     * array with SensorDevices for power
57
     *
58
     * @see SensorDevice
59
     *
60
     * @var array
61
     */
62
    private $_mbPower = array();
63
 
64
    /**
65
     * array with SensorDevices for apmers
66
     *
67
     * @see SensorDevice
68
     *
69
     * @var array
70
     */
71
    private $_mbCurrent = array();
72
 
73
    /**
74
     * array with SensorDevices for other
75
     *
76
     * @see SensorDevice
77
     *
78
     * @var array
79
     */
80
    private $_mbOther = array();
81
 
82
    /**
83
     * Returns $_mbFan.
84
     *
85
     * @see System::$_mbFan
86
     *
87
     * @return array
88
     */
89
    public function getMbFan()
90
    {
91
        if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
92
            usort($this->_mbFan, array('CommonFunctions', 'name_natural_compare'));
93
        }
94
 
95
        return $this->_mbFan;
96
    }
97
 
98
    /**
99
     * Sets $_mbFan.
100
     *
101
     * @param SensorDevice $mbFan fan device
102
     *
103
     * @see System::$_mbFan
104
     *
105
     * @return void
106
     */
107
    public function setMbFan($mbFan)
108
    {
109
        array_push($this->_mbFan, $mbFan);
110
    }
111
 
112
    /**
113
     * Returns $_mbTemp.
114
     *
115
     * @see System::$_mbTemp
116
     *
117
     * @return array
118
     */
119
    public function getMbTemp()
120
    {
121
        if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
122
            usort($this->_mbTemp, array('CommonFunctions', 'name_natural_compare'));
123
        }
124
 
125
        return $this->_mbTemp;
126
    }
127
 
128
    /**
129
     * Sets $_mbTemp.
130
     *
131
     * @param SensorDevice $mbTemp temp device
132
     *
133
     * @see System::$_mbTemp
134
     *
135
     * @return void
136
     */
137
    public function setMbTemp($mbTemp)
138
    {
139
        array_push($this->_mbTemp, $mbTemp);
140
    }
141
 
142
    /**
143
     * Returns $_mbVolt.
144
     *
145
     * @see System::$_mbVolt
146
     *
147
     * @return array
148
     */
149
    public function getMbVolt()
150
    {
151
        if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
152
            usort($this->_mbVolt, array('CommonFunctions', 'name_natural_compare'));
153
        }
154
 
155
        return $this->_mbVolt;
156
    }
157
 
158
    /**
159
     * Sets $_mbVolt.
160
     *
161
     * @param SensorDevice $mbVolt voltage device
162
     *
163
     * @see System::$_mbVolt
164
     *
165
     * @return void
166
     */
167
    public function setMbVolt($mbVolt)
168
    {
169
        array_push($this->_mbVolt, $mbVolt);
170
    }
171
 
172
    /**
173
     * Returns $_mbPower.
174
     *
175
     * @see System::$_mbPower
176
     *
177
     * @return array
178
     */
179
    public function getMbPower()
180
    {
181
        if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
182
            usort($this->_mbPower, array('CommonFunctions', 'name_natural_compare'));
183
        }
184
 
185
        return $this->_mbPower;
186
    }
187
 
188
    /**
189
     * Sets $_mbPower.
190
     *
191
     * @param SensorDevice $mbPower power device
192
     *
193
     * @see System::$_mbPower
194
     *
195
     * @return void
196
     */
197
    public function setMbPower($mbPower)
198
    {
199
        array_push($this->_mbPower, $mbPower);
200
    }
201
 
202
    /**
203
     * Returns $_mbCurrent.
204
     *
205
     * @see System::$_mbCurrent
206
     *
207
     * @return array
208
     */
209
    public function getMbCurrent()
210
    {
211
        if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
212
            usort($this->_mbCurrent, array('CommonFunctions', 'name_natural_compare'));
213
        }
214
 
215
        return $this->_mbCurrent;
216
    }
217
 
218
    /**
219
     * Sets $_mbCurrent.
220
     *
221
     * @param SensorDevice $mbCurrent current device
222
     *
223
     * @see System::$_mbCurrent
224
     *
225
     * @return void
226
     */
227
    public function setMbCurrent($mbCurrent)
228
    {
229
        array_push($this->_mbCurrent, $mbCurrent);
230
    }
231
 
232
    /**
233
     * Returns $_mbOther.
234
     *
235
     * @see System::$_mbOther
236
     *
237
     * @return array
238
     */
239
    public function getMbOther()
240
    {
241
        if (defined('PSI_SORT_SENSORS_LIST') && PSI_SORT_SENSORS_LIST) {
242
            usort($this->_mbOther, array('CommonFunctions', 'name_natural_compare'));
243
        }
244
 
245
        return $this->_mbOther;
246
    }
247
 
248
    /**
249
     * Sets $_mbOther.
250
     *
251
     * @param SensorDevice $mbOther other device
252
     *
253
     * @see System::$_mbOther
254
     *
255
     * @return void
256
     */
257
    public function setMbOther($mbOther)
258
    {
259
        array_push($this->_mbOther, $mbOther);
260
    }
261
}