Example #1
0
 function delegate_to_controller(){
   $ticket= Route::resolve($this->request_uri, $this->method);
   $controller_name= $ticket["controller_name"];
   $action_name= $ticket["action_name"];
   $params= $ticket["params"];
   $method= $ticket["method"];
   $params= $this->parse_params($params, $method);
   new $controller_name($action_name, $params, $method);
 }
Example #2
0
<?php

require_once __DIR__ . '/bootstrap.php';
session_start();
/**
 *
 * To get things started, we just call the Route classes Resolve method
 * which finds the current route and calls the nessecary method on the controller
 * assigned to this route. If it doesnt find a route, it will throw a not found exception.
 * 
 *
 */
Route::resolve();