File: class.ups.inc.php

package info (click to toggle)
phpsysinfo 3.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,900 kB
  • sloc: javascript: 22,511; php: 20,651; xml: 18,293; sh: 196; python: 58; makefile: 12
file content (64 lines) | stat: -rw-r--r-- 1,535 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
 * Basic UPS Class
 *
 * PHP version 5
 *
 * @category  PHP
 * @package   PSI_UPS
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
 * @copyright 2009 phpSysInfo
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
 * @version   SVN: $Id: class.ups.inc.php 661 2012-08-27 11:26:39Z namiltd $
 * @link      http://phpsysinfo.sourceforge.net
 */
 /**
 * Basic UPS functions for all UPS classes
 *
 * @category  PHP
 * @package   PSI_UPS
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
 * @copyright 2009 phpSysInfo
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
 * @version   Release: 3.0
 * @link      http://phpsysinfo.sourceforge.net
 */
abstract class UPS implements PSI_Interface_UPS
{
    /**
     * object for error handling
     *
     * @var PSI_Error
     */
    public $error;

    /**
     * main object for ups information
     *
     * @var UPSInfo
     */
    protected $upsinfo;

    /**
     * build the global Error object
     */
    public function __construct()
    {
        $this->error = PSI_Error::singleton();
        $this->upsinfo = new UPSInfo();
    }

    /**
     * build and return the ups information
     *
     * @see PSI_Interface_UPS::getUPSInfo()
     *
     * @return UPSInfo
     */
    final public function getUPSInfo()
    {
        $this->build();

        return $this->upsinfo;
    }
}