PHP 클래스 Drahak\Restful\Application\RouteListFactory

저자: Drahomír Hanák
상속: extends Nette\Object, implements Drahak\Restful\Application\IRouteListFactory
파일 보기 프로젝트 열기: drahak/restful

공개 메소드들

메소드 설명
__construct ( string $presentersRoot, boolean $autoRebuild, Nette\Caching\IStorage $cacheStorage, Drahak\Restful\Application\RouteAnnotation $routeAnnotation )
create ( string | null $module = NULL ) : Drahak\Restful\Application\Routes\ResourceRouteList Create route list
setModule ( string $module ) : ResourceRoute Set default module of created routes
setPrefix ( string $prefix ) : RouteListFactory Set default routes URL mask prefix

보호된 메소드들

메소드 설명
addRoutes ( Drahak\Restful\Application\Routes\ResourceRouteList $routeList, array $routeData, string $className ) : Drahak\Restful\Application\Routes\ResourceRouteList Add class routes to route list
getClassMethods ( string $className ) : Method[] Get class methods
parseClassRoutes ( Method[] $methods ) : array Parse route annotations on given object methods

비공개 메소드들

메소드 설명
getClassReflection ( string $className ) : ClassType Get class reflection

메소드 상세

__construct() 공개 메소드

public __construct ( string $presentersRoot, boolean $autoRebuild, Nette\Caching\IStorage $cacheStorage, Drahak\Restful\Application\RouteAnnotation $routeAnnotation )
$presentersRoot string from where to find presenters
$autoRebuild boolean enable automatic rebuild of robot loader
$cacheStorage Nette\Caching\IStorage
$routeAnnotation Drahak\Restful\Application\RouteAnnotation

addRoutes() 보호된 메소드

Add class routes to route list
protected addRoutes ( Drahak\Restful\Application\Routes\ResourceRouteList $routeList, array $routeData, string $className ) : Drahak\Restful\Application\Routes\ResourceRouteList
$routeList Drahak\Restful\Application\Routes\ResourceRouteList
$routeData array
$className string
리턴 Drahak\Restful\Application\Routes\ResourceRouteList

create() 최종 공개 메소드

Create route list
final public create ( string | null $module = NULL ) : Drahak\Restful\Application\Routes\ResourceRouteList
$module string | null
리턴 Drahak\Restful\Application\Routes\ResourceRouteList

getClassMethods() 보호된 메소드

Get class methods
protected getClassMethods ( string $className ) : Method[]
$className string
리턴 Nette\Reflection\Method[]

parseClassRoutes() 보호된 메소드

Parse route annotations on given object methods
protected parseClassRoutes ( Method[] $methods ) : array
$methods Nette\Reflection\Method[]
리턴 array $data[URL mask][request method] = action name e.g. $data['api/v1/articles']['GET'] = 'read'

setModule() 공개 메소드

Set default module of created routes
public setModule ( string $module ) : ResourceRoute
$module string
리턴 Drahak\Restful\Application\Routes\ResourceRoute

setPrefix() 공개 메소드

Set default routes URL mask prefix
public setPrefix ( string $prefix ) : RouteListFactory
$prefix string
리턴 RouteListFactory