Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2775 rexy 1
<?php
2
/**
3
 * basic output functions
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PSI_Output
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.Output.inc.php 569 2012-04-16 06:08:18Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * basic output functions for all output formats
17
 *
18
 * @category  PHP
19
 * @package   PSI_Output
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 Output
27
{
28
    /**
29
     * error object for logging errors
30
     *
31
     * @var PSI_Error
32
     */
33
    protected $error;
34
 
35
    /**
36
     * call the parent constructor and check for needed extensions
37
     */
38
    public function __construct()
39
    {
40
        $this->error = PSI_Error::singleton();
41
        $this->_checkConfig();
42
        CommonFunctions::checkForExtensions();
43
    }
44
 
45
    /**
46
     * read the config file and check for existence
47
     *
48
     * @return void
49
     */
50
    private function _checkConfig()
51
    {
52
        include_once PSI_APP_ROOT.'/read_config.php';
53
 
54
        if ($this->error->errorsExist()) {
55
            $this->error->errorsAsXML();
56
        }
57
    }
58
}