Files
ops-Gazelle/classes/g.class.php
T
Spine 2c97f96691 Streamline autoloading and tidy up how required PHP classes are pulled in.
Require files using __DIR__ instead of SERVER_ROOT
    Use `new Class` instead of `NEW Class`
    Class FEED => Feed
    Class VALIDATE => Validate
2020-03-01 12:03:04 +00:00

27 lines
581 B
PHP

<?php
class G {
/** @var DB_MYSQL */
public static $DB;
/** @var \CACHE */
public static $Cache;
/** @var \Gazelle\Router */
public static $Router;
/** @var \Twig\Environment */
public static $Twig;
public static $LoggedUser;
public static function initialize() {
global $DB, $Cache, $LoggedUser;
self::$DB = $DB;
self::$Cache = $Cache;
self::$LoggedUser =& $LoggedUser;
}
public static function init(\DB_MYSQL $db, \CACHE $cache) {
self::$DB = $db;
self::$Cache = $cache;
}
}