/** * 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 }