diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-01-15 15:50:43 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-01-15 15:50:43 +0100 |
commit | d58f61770463aab2c71464c11f902f0074b49b62 (patch) | |
tree | 97f55098caa342c1146f4e0bdc9f299affb62739 /src/http/Router.php | |
parent | 2d0da0b920035c90d56db5dbec6d62f5b50ba0c2 (diff) |
Diffstat (limited to 'src/http/Router.php')
-rw-r--r-- | src/http/Router.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/Router.php b/src/http/Router.php index db75f81..62f0514 100644 --- a/src/http/Router.php +++ b/src/http/Router.php @@ -10,6 +10,7 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Generator\UrlGenerator; use Symfony\Component\Routing\Loader\AnnotationFileLoader; +use Symfony\Component\Routing\Loader\AttributeFileLoader; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RouteCollection; @@ -28,7 +29,7 @@ class Router self::$context->fromRequest($request); self::$routes = new RouteCollection(); - $loader = new AnnotationFileLoader(new FileLocator(), new RouteLoader()); + $loader = new AttributeFileLoader(new FileLocator(), new RouteLoader()); $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(__DIR__ . '/Controller')); foreach ($iterator as $file) { /**@var \SplFileInfo $file*/ |