Added simplified static router:2.0 call

This commit is contained in:
xdrm-brackets 2016-12-12 20:24:09 +01:00
parent e930ab5085
commit 2d189b7bae
1 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,7 @@
class Router{
/* [1] Attributes
=========================================================*/
private $url; // current URL
@ -33,6 +34,17 @@
public static function randBoundary(){ return dechex( random_int((int) 1e10, (int) 1e20) ); }
// Instance getter
public static function launch($url=null){
/* (1) Instanciate the router (propagation) */
$instance = new Router($url);
/* (2) Launches the router */
$instance->run();
}
/* [3] Constructor
*