Ejemplo n.º 1
0
 public static function getInstance($registry)
 {
     if (null === self::$instance) {
         self::$instance = new self($registry);
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
}
require_once 'app/init.php';
require_once 'core/autoloader.php';
require_once 'core/registry.php';
require_once 'core/loader.php';
require_once 'core/event.php';
date_default_timezone_set('Europe/Berlin');
$registry = new Registry();
//database
$db = DB::getInstance();
$db->select_db(DB_DATABASE);
$registry->set('db', $db);
//doucment
$registry->set('document', new Document());
//session handler
$sessionHandler = mysqlSessionHandler::getInstance($registry);
session_set_save_handler($sessionHandler);
//session
$session = Session::getInstance();
$registry->set('session', $session);
//html
$html = new html();
$registry->set('html', $html);
//request
$request = new Request();
$registry->set('request', $request);
//config
$config = new Config();
$query = $db->query("SELECT * FROM setting");
foreach ($query->rows as $setting) {
    if (!$setting['serialised']) {