API Responses StreamedListObjectsResponse - evansims/openfga-php GitHub Wiki

Response containing streaming objects that a user has a specific relationship with. This response processes a streaming HTTP response and yields object identifiers as they are received from the server. This allows for memory-efficient processing of large result sets without loading the entire dataset into memory.

Table of Contents


Namespace

OpenFGA\Responses


Source

View source code


Implements


Related Classes


Methods

fromResponse

Implements Responses\StreamedListObjectsResponseInterface

public function fromResponse(
    HttpResponseInterface $response,
    HttpRequestInterface $request,
    SchemaValidatorInterface $validator,
): Generator<int, StreamedListObjectsResponseInterface>

Create a streaming response from an HTTP response. Processes the streaming HTTP response and returns a Generator that yields individual object identifiers as they are received from the server.

View source


Parameters

Name Type Description
$response HttpResponseInterface The HTTP response from the API
$request HttpRequestInterface The original HTTP request
$validator SchemaValidatorInterface Schema validator for response validation

Returns

Generator<int, StreamedListObjectsResponseInterface> — Generator yielding response objects


getObject

public function getObject(): string

Get a single object identifier from a streamed response chunk.

View source


Returns

string — The object identifier

⚠️ **GitHub.com Fallback** ⚠️