template(); $obj = new View($view); $obj->show($vars); } // Here be default handlers //////////////////////////////////////////// public function index($routed, $remainder) { header('Content-type: text/plain'); echo " == Generic Controller Index == \n\n"; $routed_str = implode('/', $routed); $remainder_str = implode('/', $remainder); echo "Full path: $routed_str/$remainder_str\n"; echo "Controller path: $routed_str\n"; echo "Remainder path: $remainder_str\n"; } public function http404($routed, $remainder) { $this->showView('http404', array('routed'=>$routed, 'remainder'=>$remainder)); } }