public function getResourceUri(string $resource, array $options): string
    {
        if (\strpos($resource, '.') === false) {
            return $resource;
        }

        // Once we have built the base URI, we'll remove the parameter holder for this
        // base resource name so that the individual route adders can suffix these
        // paths however they need to, as some do not have any parameters at all.
        $segments = \explode('.', $resource);

        $uri = $this->getNestedResourceUri($segments, $options);

        $resource = \end($segments);

        if (isset($options['wildcards'][$resource])) {
            $resource = $options['wildcards'][$resource];
        }

        return \str_replace('/{' . $this->getResourceWildcard($resource) . '}', '', $uri);
    }
public function getResourceUri(string $resource, array $options): string
    {
        if (\strpos($resource, '.') === false) {
            return $resource;
        }

        // Once we have built the base URI, we'll remove the parameter holder for this
        // base resource name so that the individual route adders can suffix these
        // paths however they need to, as some do not have any parameters at all.
        $segments = \explode('.', $resource);

        $uri = $this->getNestedResourceUri($segments, $options);

        $resource = \end($segments);

        if (isset($options['wildcards'][$resource])) {
            $resource = $options['wildcards'][$resource];
        }

        return \str_replace('/{' . $this->getResourceWildcard($resource) . '}', '', $uri);
    }
public function getResourceUri ( string $ resource , array $ options ) : string { if ( \ strpos ( $ resource , '.' ) === false ) { return $ resource ; } // Once we have built the base URI, we'll remove the parameter holder for this // base resource name so that the individual route adders can suffix these // paths however they need to, as some do not have any parameters at all. $ segments = \ explode ( '.' , $ resource ) ; $ uri = $ this -> getNestedResourceUri ( $ segments , $ options ) ; $ resource = \ end ( $ segments ) ; if ( isset ( $ options [ 'wildcards' ] [ $ resource ] ) ) { $ resource = $ options [ 'wildcards' ] [ $ resource ] ; } return \ str_replace ( '/{' . $ this -> getResourceWildcard ( $ resource ) . '}' , '' , $ uri ) ; }
Get the base resource URI for a given resource.

@param string $resource
@param array  $options

@return string
Get the base resource URI for a given resource .