Robust PSR-7 router supporting attribute-based routing, complete with PSR-15 middleware and PSR-11 container support, all built upon the foundation of FastRoute.
The route condition handling must be moved from the Zaphyr\Router\Router class to the Zaphyr\Router\Dispatcher class. Otherwise, all routes called after a failed route would result in a 404 error.
The scheme and host paremeter in the Zaphyr\Router\Traits\RouteConditionTrait must return null by default. Otherwise, PSR7 libraries may not work correct with the router repository.
For example, a $request->getUri()->getScheme() method may not return an empty string by default, but fetch the scheme from the $_SERVER globals. In this case a Zaphyr\Router\Exceptions\NotFoundException would be thrown, because the Zaphyr\Router\Traits\RouteCondition::getScheme() method returns an empty string by default.
Therefore the scheme and host parameters in the Zaphyr\Router\Traits\RouteConditionTrait must be set to null by default and a query may only take place if these parameters are not null.