2024-09-07 20:53:46 +10:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* basic output functions
|
|
|
|
*
|
|
|
|
* PHP version 5
|
|
|
|
*
|
|
|
|
* @category PHP
|
|
|
|
* @package PSI_Output
|
|
|
|
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
|
|
|
* @copyright 2009 phpSysInfo
|
2025-05-14 16:14:01 +01:00
|
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
2024-09-07 20:53:46 +10:00
|
|
|
* @version SVN: $Id: class.Output.inc.php 569 2012-04-16 06:08:18Z namiltd $
|
|
|
|
* @link http://phpsysinfo.sourceforge.net
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* basic output functions for all output formats
|
|
|
|
*
|
|
|
|
* @category PHP
|
|
|
|
* @package PSI_Output
|
|
|
|
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
|
|
|
* @copyright 2009 phpSysInfo
|
2025-05-14 16:14:01 +01:00
|
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
2024-09-07 20:53:46 +10:00
|
|
|
* @version Release: 3.0
|
|
|
|
* @link http://phpsysinfo.sourceforge.net
|
|
|
|
*/
|
|
|
|
abstract class Output
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* error object for logging errors
|
|
|
|
*
|
2025-05-14 16:14:01 +01:00
|
|
|
* @var PSI_Error
|
2024-09-07 20:53:46 +10:00
|
|
|
*/
|
|
|
|
protected $error;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* call the parent constructor and check for needed extensions
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
2025-05-14 16:14:01 +01:00
|
|
|
$this->error = PSI_Error::singleton();
|
2024-09-07 20:53:46 +10:00
|
|
|
$this->_checkConfig();
|
|
|
|
CommonFunctions::checkForExtensions();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* read the config file and check for existence
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
private function _checkConfig()
|
|
|
|
{
|
2025-05-14 16:14:01 +01:00
|
|
|
include_once PSI_APP_ROOT.'/read_config.php';
|
2024-09-07 20:53:46 +10:00
|
|
|
|
|
|
|
if ($this->error->errorsExist()) {
|
|
|
|
$this->error->errorsAsXML();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|