class AnnotatedRouteControllerLoader extends AnnotationClassLoader
AnnotatedRouteControllerLoader is an implementation of AnnotationClassLoader that sets the '_controller' default based on the class and method names.
protected | $reader | from AnnotationClassLoader | |
protected string | $routeAnnotationClass | from AnnotationClassLoader | |
protected int | $defaultRouteIndex | from AnnotationClassLoader |
__construct(Reader $reader) | from AnnotationClassLoader | |
setRouteAnnotationClass(string $class) Sets the annotation class to read route properties from. | from AnnotationClassLoader | |
load(string $class, string|null $type = null) Loads from annotations from a class. | from AnnotationClassLoader | |
addRoute(RouteCollection $collection, $annot, $globals, ReflectionClass $class, ReflectionMethod $method) | from AnnotationClassLoader | |
bool | supports(mixed $resource, string|null $type = null) Returns whether this class supports the given resource. | from AnnotationClassLoader |
setResolver(LoaderResolverInterface $resolver) Sets the loader resolver. | from AnnotationClassLoader | |
LoaderResolverInterface | getResolver() Gets the loader resolver. | from AnnotationClassLoader |
string | getDefaultRouteName(ReflectionClass $class, ReflectionMethod $method) Makes the default route name more sane by removing common keywords. | |
getGlobals(ReflectionClass $class) | from AnnotationClassLoader | |
createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition) | from AnnotationClassLoader | |
configureRoute(Route $route, ReflectionClass $class, ReflectionMethod $method, $annot) Configures the _controller default parameter of a given Route instance. |
Reader | $reader |
Sets the annotation class to read route properties from.
string | $class | A fully-qualified class name |
Loads from annotations from a class.
string | $class | A class name |
string|null | $type | The resource type or null if unknown |
InvalidArgumentException | When route can't be parsed |
RouteCollection | $collection | |
$annot | ||
$globals | ||
ReflectionClass | $class | |
ReflectionMethod | $method |
Returns whether this class supports the given resource.
mixed | $resource | A resource |
string|null | $type | The resource type or null if unknown |
bool | True if this class supports the given resource, false otherwise |
Sets the loader resolver.
LoaderResolverInterface | $resolver |
Gets the loader resolver.
LoaderResolverInterface | A LoaderResolverInterface instance |
Makes the default route name more sane by removing common keywords.
ReflectionClass | $class | |
ReflectionMethod | $method |
string |
ReflectionClass | $class |
$path | ||
$defaults | ||
$requirements | ||
$options | ||
$host | ||
$schemes | ||
$methods | ||
$condition |
Configures the _controller default parameter of a given Route instance.
Route | $route | |
ReflectionClass | $class | |
ReflectionMethod | $method | |
$annot |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Routing/AnnotatedRouteControllerLoader.html