src/main/php/routing/Route.php
public function asResource(HttpUri $uri, array $globalMimeTypes = []): Resource
    {
        $routeUri = $uri->withPath($this->normalizePath());
        return new Resource(
                $this->resourceName(),
                $this->allowedRequestMethods,
                $this->requiresHttps() ? $routeUri->toHttps() : $routeUri,
                $this->supportedMimeTypes($globalMimeTypes)->asArray(),
                $this->routingAnnotations(),
                $this->authConstraint()
        );
    }
public function asResource(HttpUri $uri, array $globalMimeTypes = []): Resource
    {
        $routeUri = $uri->withPath($this->normalizePath());
        return new Resource(
                $this->resourceName(),
                $this->allowedRequestMethods,
                $this->requiresHttps() ? $routeUri->toHttps() : $routeUri,
                $this->supportedMimeTypes($globalMimeTypes)->asArray(),
                $this->routingAnnotations(),
                $this->authConstraint()
        );
    }
public function asResource ( HttpUri $ uri , array $ globalMimeTypes = [ ] ) : Resource { $ routeUri = $ uri -> withPath ( $ this -> normalizePath ( ) ) ; return new Resource ( $ this -> resourceName ( ) , $ this -> allowedRequestMethods , $ this -> requiresHttps ( ) ? $ routeUri -> toHttps ( ) : $ routeUri , $ this -> supportedMimeTypes ( $ globalMimeTypes ) -> asArray ( ) , $ this -> routingAnnotations ( ) , $ this -> authConstraint ( ) ) ; }
returns route as resource

@param   \stubbles\peer\http\HttpUri  $uri
@param   string[]                      $globalMimeTypes  list of globally supported mime types
@return  \stubbles\webapp\routing\api\Resource
@since   6.1.0
returns route as resource