PHP 클래스 Symfony\Component\Routing\Loader\AnnotationClassLoader

You need to define an implementation for the getRouteDefaults() method. Most of the time, this method should define some PHP callable to be called for the route (a controller in MVC speak). The @Route annotation can be set on the class (for global parameters), and on each method. The @Route annotation main value is the route pattern. The annotation also recognizes three parameters: requirements, options, and name. The name parameter is mandatory. Here is an example of how you should be able to use it: ** * @Route("/Blog") * / class Blog { ** * @Route("/", name="blog_index") * / public function index() { } ** * @Route("/:id", name="blog_post", requirements = {"id" = "\d+"}) * / public function show() { } }
저자: Fabien Potencier ([email protected])
상속: implements Symfony\Component\Routing\Loader\LoaderInterface
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$defaultRouteIndex
$reader
$routeAnnotationClass

공개 메소드들

메소드 설명
__construct ( AnnotationReader $reader ) Constructor.
__construct ( Doctrine\Common\Annotations\Reader $reader ) Constructor.
getResolver ( ) : Symfony\Component\Config\Loader\LoaderResolver Gets the loader resolver.
getResolver ( ) : LoaderResolver Gets the loader resolver.
load ( string $class ) : RouteCollection Loads from annotations from a class.
load ( string $class, string $type = null ) : RouteCollection Loads from annotations from a class.
setResolver ( Symfony\Component\Config\Loader\LoaderResolver $resolver ) Sets the loader resolver.
setResolver ( LoaderResolver $resolver ) Sets the loader resolver.
setRouteAnnotationClass ( string $class ) Sets the annotation class to read route properties from.
supports ( mixed $resource ) : boolean Returns true if this class supports the given resource.
supports ( mixed $resource, string $type = null ) : boolean Returns true if this class supports the given resource.

보호된 메소드들

메소드 설명
addRoute ( RouteCollection $collection, $annot, $globals, ReflectionClass $class, ReflectionMethod $method )
configureRoute ( Symfony\Component\Routing\Route $route, ReflectionClass $class, ReflectionMethod $method )
configureRoute ( Symfony\Component\Routing\Route $route, ReflectionClass $class, ReflectionMethod $method, $annot )
getDefaultRouteName ( ReflectionClass $class, ReflectionMethod $method )
getDefaultRouteName ( ReflectionClass $class, ReflectionMethod $method ) : string Gets the default route name for a class method.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( AnnotationReader $reader )
$reader Doctrine\Common\Annotations\AnnotationReader

__construct() 공개 메소드

Constructor.
public __construct ( Doctrine\Common\Annotations\Reader $reader )
$reader Doctrine\Common\Annotations\Reader

addRoute() 보호된 메소드

protected addRoute ( RouteCollection $collection, $annot, $globals, ReflectionClass $class, ReflectionMethod $method )
$collection Symfony\Component\Routing\RouteCollection
$class ReflectionClass
$method ReflectionMethod

configureRoute() 추상적인 보호된 메소드

abstract protected configureRoute ( Symfony\Component\Routing\Route $route, ReflectionClass $class, ReflectionMethod $method )
$route Symfony\Component\Routing\Route
$class ReflectionClass
$method ReflectionMethod

configureRoute() 추상적인 보호된 메소드

abstract protected configureRoute ( Symfony\Component\Routing\Route $route, ReflectionClass $class, ReflectionMethod $method, $annot )
$route Symfony\Component\Routing\Route
$class ReflectionClass
$method ReflectionMethod

getDefaultRouteName() 보호된 메소드

protected getDefaultRouteName ( ReflectionClass $class, ReflectionMethod $method )
$class ReflectionClass
$method ReflectionMethod

getDefaultRouteName() 보호된 메소드

Gets the default route name for a class method.
protected getDefaultRouteName ( ReflectionClass $class, ReflectionMethod $method ) : string
$class ReflectionClass
$method ReflectionMethod
리턴 string

getResolver() 공개 메소드

Gets the loader resolver.
public getResolver ( ) : Symfony\Component\Config\Loader\LoaderResolver
리턴 Symfony\Component\Config\Loader\LoaderResolver A LoaderResolver instance

getResolver() 공개 메소드

Gets the loader resolver.
public getResolver ( ) : LoaderResolver
리턴 LoaderResolver A LoaderResolver instance

load() 공개 메소드

Loads from annotations from a class.
public load ( string $class ) : RouteCollection
$class string A class name
리턴 Symfony\Component\Routing\RouteCollection A RouteCollection instance

load() 공개 메소드

Loads from annotations from a class.
public load ( string $class, string $type = null ) : RouteCollection
$class string A class name
$type string The resource type
리턴 Symfony\Component\Routing\RouteCollection A RouteCollection instance

setResolver() 공개 메소드

Sets the loader resolver.
public setResolver ( Symfony\Component\Config\Loader\LoaderResolver $resolver )
$resolver Symfony\Component\Config\Loader\LoaderResolver A LoaderResolver instance

setResolver() 공개 메소드

Sets the loader resolver.
public setResolver ( LoaderResolver $resolver )
$resolver LoaderResolver A LoaderResolver instance

setRouteAnnotationClass() 공개 메소드

Sets the annotation class to read route properties from.
public setRouteAnnotationClass ( string $class )
$class string A fully-qualified class name

supports() 공개 메소드

Returns true if this class supports the given resource.
public supports ( mixed $resource ) : boolean
$resource mixed A resource
리턴 boolean true if this class supports the given resource, false otherwise

supports() 공개 메소드

Returns true if this class supports the given resource.
public supports ( mixed $resource, string $type = null ) : boolean
$resource mixed A resource
$type string The resource type
리턴 boolean True if this class supports the given resource, false otherwise

프로퍼티 상세

$defaultRouteIndex 보호되어 있는 프로퍼티

protected $defaultRouteIndex

$reader 보호되어 있는 프로퍼티

protected $reader

$routeAnnotationClass 보호되어 있는 프로퍼티

protected $routeAnnotationClass