mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
30 lines
653 B
PHP
30 lines
653 B
PHP
<?php
|
|
|
|
namespace Gazelle;
|
|
|
|
abstract class Base {
|
|
/** @var \DB_MYSQL */
|
|
protected static $_db;
|
|
protected $db;
|
|
|
|
/** @var \Gazelle\Cache */
|
|
protected static $_cache;
|
|
protected $cache;
|
|
|
|
/** @var \Twig\Environment */
|
|
protected static $_twig;
|
|
protected $twig;
|
|
|
|
public function __construct() {
|
|
$this->cache =& self::$_cache;
|
|
$this->db =& self::$_db;
|
|
$this->twig =& self::$_twig;
|
|
}
|
|
|
|
public static function initialize(\Gazelle\Cache $cache, \DB_MYSQL $db, \Twig\Environment $twig) {
|
|
self::$_db =& $db;
|
|
self::$_cache =& $cache;
|
|
self::$_twig =& $twig;
|
|
}
|
|
}
|