diff --git a/src/Inject/Route.php b/src/Inject/Route.php new file mode 100644 index 0000000..f8d4f82 --- /dev/null +++ b/src/Inject/Route.php @@ -0,0 +1,37 @@ +path); + } + + + /** + * @param object $class + * @param string $method + * @return void + * @throws \ReflectionException + */ + public function dispatch(object $class, string $method): void + { + // TODO: Implement dispatch() method. + Router::addRoute($this->method, $this->path, [$class, $method]); + + $this->registerMiddleware($class, $method); + } +}