Added simplified static router:2.0 call
This commit is contained in:
parent
e930ab5085
commit
2d189b7bae
|
@ -17,6 +17,7 @@
|
||||||
class Router{
|
class Router{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* [1] Attributes
|
/* [1] Attributes
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
private $url; // current URL
|
private $url; // current URL
|
||||||
|
@ -33,6 +34,17 @@
|
||||||
public static function randBoundary(){ return dechex( random_int((int) 1e10, (int) 1e20) ); }
|
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
|
/* [3] Constructor
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue