/** * Inizialize the cool framework */ public function initialize() { PWEL_ROUTING::locateRelativePath(); $this->getConfig(); try { if (self::$configured == false) { $this->autoConfigRouting(); } $routing = new PWEL_ROUTING(); $routing->loadAutoInject(); $components = new PWEL_COMPONENTS(func_get_args()); $routing->start(); $this->disablePlugins(); } catch (Exception $e) { if (PWEL::$config['pwel']['status'] == strtolower('development')) { print '<div style="padding:5px;">'; print '<strong>Message:</strong> ' . $e->getMessage() . '<br />'; print '<strong>File:</strong> ' . $e->getFile() . '<br />'; print '<strong>Line:</strong> ' . $e->getLine() . '<br />'; print '<strong>Trace:</strong> <pre><code>' . $e->getTraceAsString() . '</code></pre><br />'; print '</div>'; } else { $routing = new PWEL_ROUTING(); $routing->displayError(); } } }