/** Initialize automatically the various components of the application according to the configuration data. @param $aConfig The configuration data for this application. */ public function __construct($aConfig) { $this->aConfig = $aConfig; // Add path to autoload // - All path are separated by : like in PATH environment variable // - A // in the path means ROOT_PATH if (!empty($this->aConfig['app.autoload.path'])) { $aPath = explode(':', $this->aConfig['app.autoload.path']); foreach ($aPath as $s) { weeAutoload::addPath(str_replace('//', ROOT_PATH, $s)); } } // Timezone settings if (!empty($this->aConfig['app.timezone'])) { date_default_timezone_set($this->aConfig['app.timezone']); } // Define the default error page from the configuration if (!empty($this->aConfig['app.error.default'])) { weeException::setErrorPage(str_replace('//', ROOT_PATH, $this->aConfig['app.error.default'])); } // Force selected drivers to start $aStart = $this->cnfArray('start'); foreach ($aStart as $sName => $b) { if (!empty($b)) { $this->__get($sName); } } }
<?php weeException::setErrorPage(ROOT_PATH . 'app/tpl/error_page.tpl');