Exemple #1
0
$autoloader->init();
/* get instance */
$registry = Registry::getInstance();
$request = Request::getInstance();
$config = Config::getInstance();
/* request and config */
$request->init();
$config->init();
/* database */
Db::construct($config);
Db::init();
/* startup and registry */
startup();
$registry->init();
/* refresh */
$request->refreshSession();
/* detector */
$detectorLanguage = new Detector\Language($registry, $request);
$detectorTemplate = new Detector\Template($registry, $request);
/* set language and template */
$registry->set('language', $detectorLanguage->getOutput());
$registry->set('template', $detectorTemplate->getOutput());
/* language */
$language = Language::getInstance();
$language->init($registry->get('language'));
/* hook */
if ($registry->get('dbStatus') === 2) {
    Hook::construct($registry);
    Hook::init();
    Hook::trigger('init');
}
Exemple #2
0
<?php

namespace Redaxscript;

/* include as needed */
include_once 'includes/Autoloader.php';
/* init */
Autoloader::init();
Request::init();
/* registry and config */
$registry = Registry::getInstance();
$config = Config::getInstance();
/* database and hook */
Db::init($config);
Hook::init($registry);
/* detector */
$detectorLanguage = new Detector\Language($registry);
$detectorTemplate = new Detector\Template($registry);
/* set language and template */
$registry->set('language', $detectorLanguage->getOutput());
$registry->set('template', $detectorTemplate->getOutput());
/* language */
$language = Language::getInstance();
$language->init($registry->get('language'));
/* define deprecated constants */
define('LANGUAGE', $detectorLanguage->getOutput());
define('TEMPLATE', $detectorTemplate->getOutput());