Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2770 rexy 1
<?php
2
/**
3
 * Basic OS Class
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PSI sensors class
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.sensors.inc.php 661 2012-08-27 11:26:39Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * Basic OS functions for all OS classes
17
 *
18
 * @category  PHP
19
 * @package   PSI sensors class
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
abstract class Sensors implements PSI_Interface_Sensor
27
{
28
    /**
29
     * object for error handling
30
     *
31
     * @var PSI_Error
32
     */
33
    protected $error;
34
 
35
    /**
36
     * object for the information
37
     *
38
     * @var MBInfo
39
     */
40
    protected $mbinfo;
41
 
42
    /**
43
     * build the global Error object
44
     */
45
    public function __construct()
46
    {
47
        $this->error = PSI_Error::singleton();
48
        $this->mbinfo = new MBInfo();
49
    }
50
 
51
    /**
52
     * get the filled or unfilled (with default values) MBInfo object
53
     *
54
     * @see PSI_Interface_Sensor::getMBInfo()
55
     *
56
     * @return MBInfo
57
     */
58
    final public function getMBInfo()
59
    {
60
        $this->build();
61
 
62
        return $this->mbinfo;
63
    }
64
}