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 | |
return | Drahak\Restful\Application\Routes\ResourceRouteList |
protected function addRoutes(ResourceRouteList $routeList, array $routeData, $className)
{
$presenter = str_replace('Presenter', '', self::getClassReflection($className)->getShortName());
foreach ($routeData as $mask => $dictionary) {
$routeList[] = new ResourceRoute($mask, array('presenter' => $presenter, 'action' => $dictionary), IResourceRouter::RESTFUL);
}
return $routeList;
}