"Fossies" - the Fresh Open Source Software Archive

Member "fogproject-1.5.9/packages/web/lib/fog/system.class.php" (13 Sep 2020, 1524 Bytes) of package /linux/misc/fogproject-1.5.9.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "system.class.php": 1.5.8_vs_1.5.9.

    1 <?php
    2 /**
    3  * System, the basic system layout.
    4  *
    5  * PHP Version 5
    6  *
    7  * This just presents the system variables
    8  *
    9  * @category System
   10  * @package  FOGProject
   11  * @author   Tom Elliott <tommygunsster@gmail.com>
   12  * @license  http://opensource.org/licenses/gpl-3.0 GPLv3
   13  * @link     https://fogproject.org
   14  */
   15 /**
   16  * System, the basic system layout.
   17  *
   18  * @category System
   19  * @package  FOGProject
   20  * @author   Tom Elliott <tommygunsster@gmail.com>
   21  * @license  http://opensource.org/licenses/gpl-3.0 GPLv3
   22  * @link     https://fogproject.org
   23  */
   24 class System
   25 {
   26     const PHP_REQUIRED = '5.6.0';
   27     /**
   28      * Checks the php version against what we require.
   29      *
   30      * @return void
   31      */
   32     private static function _versionCompare()
   33     {
   34         $msg = '';
   35         if (false === version_compare(PHP_VERSION, self::PHP_REQUIRED, '>=')) {
   36             $msg = sprintf(
   37                 '%s. %s %s, %s %s %s.',
   38                 _('Your system PHP Version is not sufficient'),
   39                 _('You have version'),
   40                 PHP_VERSION,
   41                 _('version'),
   42                 self::PHP_REQUIRED,
   43                 _('is required')
   44             );
   45         }
   46         if ($msg) {
   47             die($msg);
   48         }
   49     }
   50     /**
   51      * Constructs the system variables.
   52      */
   53     public function __construct()
   54     {
   55         self::_versionCompare();
   56         define('FOG_VERSION', '1.5.9');
   57         define('FOG_SCHEMA', 270);
   58         define('FOG_BCACHE_VER', 135);
   59         define('FOG_CLIENT_VERSION', '0.12.0');
   60     }
   61 }