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
OpenFGA\Responses
- StreamedListObjectsResponseInterface (interface)
- StreamedListObjectsRequest (request)
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.
| Name | Type | Description |
|---|---|---|
$response |
HttpResponseInterface |
The HTTP response from the API |
$request |
HttpRequestInterface |
The original HTTP request |
$validator |
SchemaValidatorInterface |
Schema validator for response validation |
Generator<int, StreamedListObjectsResponseInterface> — Generator yielding response objects
public function getObject(): stringGet a single object identifier from a streamed response chunk.
string — The object identifier