/** * Durante el contructor se obtiene informacion * de la ruta, la ruta en si, el metodo http que * se solicita */ public function __construct() { parent::__construct(); $route = Route::parse(Globals::get('request_uri')); Globals::registre('uri_params', $route['params']); $this->action = $route['action']; $this->method = $route['method']; $this->routes = array(); $this->binded = array(); }
/** * Durante el constructor se parsea la ruta de la * url solicitada para obtener el controlador, la * accion y los parametros. */ public function __construct() { parent::__construct(); $route = Route::parse(Globals::get('request_uri')); extract($route); Globals::registre('uri_params', $params); $this->controller_namespace = '\\App\\Controllers\\'; $this->controller_file = Globals::get('app_path') . "/controllers/{$controller}.php"; $this->controller = $controller; $this->action = $action; }