public static function newInstance() { $self = new static(); $self->fastRoute = \FastRoute\SimpleDispatcher(function (\FastRoute\RouteCollector $R) { foreach (self::$route_array as $name => $route) { $R->addRoute($route[0], strtolower($route[1]), $route[2]); } }); return $self; }
function createDispatcher() { $dispatcher = \FastRoute\SimpleDispatcher('TierTest\\JigBridge\\routesFunction'); return $dispatcher; }