config = new Config(); $this->helpers = new Helpers($this); $this->request = new Request($this); $this->response = new Response($this); $this->security = new Security($this); } /** * Strike the Anvil! */ public function strike() { ob_start(); $uri_array = $this->request->uri_array; $class_name = (!isset($uri_array[0]) || empty($uri_array[0])) ? $this->config->item('default_controller') : array_shift($uri_array); $start_token = $this->config->item('starting_token'); while($start_token-- > 0) { array_shift($uri_array); } $cc_name = ''; if(!file_exists(APP_ROOT.'/controllers/'.$class_name.'_controller.php')) { $class_name = $this->config->item('default_controller'); } $cc_name = $class_name.'_controller'; $this->active_controller = $class_name; // Ok, pull in the requested Controller require_once(APP_ROOT.'/controllers/'.$cc_name.'.php'); $c_class = new $cc_name($this); $c_class->index(); // The controller should take care of the rest. ob_end_flush(); } }