Méthode | Description | |
---|---|---|
__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 ) : |
Set default module of created routes | |
setPrefix ( string $prefix ) : |
Set default routes URL mask prefix |
Méthode | Description | |
---|---|---|
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 ) : |
Get class methods | |
parseClassRoutes ( |
Parse route annotations on given object methods |
Méthode | Description | |
---|---|---|
getClassReflection ( string $className ) : |
Get class reflection |
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 |
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 | |
Résultat | Drahak\Restful\Application\Routes\ResourceRouteList |
protected getClassMethods ( string $className ) : |
||
$className | string | |
Résultat |
protected parseClassRoutes ( |
||
$methods | ||
Résultat | array | $data[URL mask][request method] = action name e.g. $data['api/v1/articles']['GET'] = 'read' |