Пример #1
0
 public static function i()
 {
     if (self::$instance === null) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
Пример #2
0
        }
    } else {
        // Can't find the presenter at all.
        // Show a 404
        core_debug::i()->add('404', 'File not found: ', __DIR__ . '/../../application/presenters/presenter_' . core_requests::i()->get('presenter') . '.php');
    }
}
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="DISPLAY RESULTS">
core_paper::i()->add($presenter->data);
core_paper::i()->template = core_requests::i()->get('presenter') . '.html';
core_paper::i()->display();
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="DEBUGGING + LOGGING">
if (core_settings::i()->get('CONFIG_SETTINGS_DEBUG')) {
    // Only display the debug data in xml or html files
    if (core_paper::i()->mime == 'text/html' && core_paper::i()->mime == 'text/xml') {
        print "<!--[\n\n";
        if (isset($_SESSION)) {
            print session_id() . "\n\n";
            print_r($_SESSION);
            print "\n\n";
        }
        print_r(core_debug::i()->get());
        print "\n]-->";
    }
}
if (core_settings::i()->get('CONFIG_SETTINGS_LOGFILE')) {
    core_logging::i()->write();
}
// </editor-fold>