diff --git a/src/packages/router/2.0/core/Router.php b/src/packages/router/2.0/core/Router.php index 5fc72ff..f2200a7 100644 --- a/src/packages/router/2.0/core/Router.php +++ b/src/packages/router/2.0/core/Router.php @@ -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 *