/** * This methode initializes the framework. * Until now this means setting up the autoload stack. */ public static function init() { // init exception handling include_once 'library/moonlake/application/application.php'; // if we get until here, we can now use Application::exceptionHandler()! // starting output buffering, so we can clear output if there is an // exception ob_start(); try { // init autoload include_once 'library/moonlake/autoload/autoload.php'; Moonlake_Autoload_Autoload::initAutoload(); // <-- maybe doing some more init in here :) // --> init end } catch (Exception $e) { // cleaning any previous output ob_clean(); // call exception handler, so we get nice output echo Moonlake_Application_Application::exceptionHandler($e); } }