AnnotatedRouteControllerLoader
class AnnotatedRouteControllerLoader extends AnnotationClassLoader
AnnotatedRouteControllerLoader is an implementation of AnnotationClassLoader that sets the '_controller' default based on the class and method names.
Properties
protected | $reader | from AnnotationClassLoader | |
protected string | $routeAnnotationClass | from AnnotationClassLoader | |
protected int | $defaultRouteIndex | from AnnotationClassLoader |
Methods
setRouteAnnotationClass(string $class)
Sets the annotation class to read route properties from.
load(string $class, string|null $type = null)
Loads from annotations from a class.
addRoute(RouteCollection $collection, $annot, $globals, ReflectionClass $class, ReflectionMethod $method)
No description
bool
supports(mixed $resource, string|null $type = null)
Returns whether this class supports the given resource.
string
getDefaultRouteName(ReflectionClass $class, ReflectionMethod $method)
Makes the default route name more sane by removing common keywords.
createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition)
No description
configureRoute(Route $route, ReflectionClass $class, ReflectionMethod $method, $annot)
Configures the _controller default parameter of a given Route instance.
Details
protected
addRoute(RouteCollection $collection, $annot, $globals, ReflectionClass $class, ReflectionMethod $method)
bool
supports(mixed $resource, string|null $type = null)
Returns whether this class supports the given resource.
protected string
getDefaultRouteName(ReflectionClass $class, ReflectionMethod $method)
Makes the default route name more sane by removing common keywords.
protected
createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition)
protected
configureRoute(Route $route, ReflectionClass $class, ReflectionMethod $method, $annot)
Configures the _controller default parameter of a given Route instance.