Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

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