/** * The connect() method is the one that actually processes the request and passes control to the * requested app's view component */ private function connect() { $get = new DArray($_GET); //just wana show off the DArray a bit <_< //if they dont ask for an action, show them the index page $page = $get->hasKey('action') ? $get->get($key) : DSettings::$defaultPages['index_action']; foreach (DSettings::$pages as $p) { if ($p['action'] == $page) { $page = $p['path']; break 1; } else { $page = ''; } } include_once DFPath('app.view', !empty($page) ? $page : DSettings::$defaultPages['notFound_action'], false); //cos the choice of file type isnt limited to .php alone }
/** * By default, all errors are logged through here. Hence to see any error; we have to expicilty request for it * This function helps to do the real error logging into the DErrorHandler class. * @see DErrorHandler */ function _DBTSRSetErrors($error, $errorString, $filename, $line, $symbols) { //check to make sure error isnt fatal $tag = DArray::getInstance(explode(SLASH, $filename))->last() . " ({$line}) "; DErrorHandler::addError("{$tag} : <b>{$errorString}</b>", $tag); }