src/Server/Server.php
public function all(
        string $name,
        Specification $specification = null,
        Range $range = null
    ): SetInterface {
        $definition = $this->capabilities->get($name);

        if ($range !== null && !$definition->isRangeable()) {
            throw new ResourceNotRangeable;
        }

        if ($specification !== null) {
            $query = '?'.($this->translate)($specification);
        }

        $url = $this->resolver->resolve(
            (string) $definition->url(),
            $query ?? (string) $definition->url()
        );
        $url = Url::fromString($url);
        $headers = Headers::of();

        if ($range !== null) {
            $headers = Headers::of(
                new RangeHeader(
                    new RangeValue(
                        'resource',
                        $range->firstPosition(),
                        $range->lastPosition()
                    )
                )
            );
        }

        $response = ($this->fulfill)(
            new Request(
                $url,
                Method::get(),
                new ProtocolVersion(1, 1),
                $headers
            )
        );

        return ($this->extractIdentities)($response, $definition);
    }
public function all(
        string $name,
        Specification $specification = null,
        Range $range = null
    ): SetInterface {
        $definition = $this->capabilities->get($name);

        if ($range !== null && !$definition->isRangeable()) {
            throw new ResourceNotRangeable;
        }

        if ($specification !== null) {
            $query = '?'.($this->translate)($specification);
        }

        $url = $this->resolver->resolve(
            (string) $definition->url(),
            $query ?? (string) $definition->url()
        );
        $url = Url::fromString($url);
        $headers = Headers::of();

        if ($range !== null) {
            $headers = Headers::of(
                new RangeHeader(
                    new RangeValue(
                        'resource',
                        $range->firstPosition(),
                        $range->lastPosition()
                    )
                )
            );
        }

        $response = ($this->fulfill)(
            new Request(
                $url,
                Method::get(),
                new ProtocolVersion(1, 1),
                $headers
            )
        );

        return ($this->extractIdentities)($response, $definition);
    }
{@inheritdoc}