ApiPlatform\Core\Bridge\Symfony\Routing\RouterOperationPathResolver::resolveOperationPath PHP Méthode

resolveOperationPath() public méthode

public resolveOperationPath ( string $resourceShortName, array $operation, boolean $collection ) : string
$resourceShortName string
$operation array
$collection boolean
Résultat string
    public function resolveOperationPath(string $resourceShortName, array $operation, bool $collection) : string
    {
        if (!isset($operation['route_name'])) {
            return $this->deferred->resolveOperationPath($resourceShortName, $operation, $collection);
        }
        $route = $this->router->getRouteCollection()->get($operation['route_name']);
        if (null === $route) {
            throw new InvalidArgumentException(sprintf('The route "%s" of the resource "%s" was not found.', $operation['route_name'], $resourceShortName));
        }
        return $route->getPath();
    }
RouterOperationPathResolver