API Requests StreamedListObjectsRequestInterface - evansims/openfga-php GitHub Wiki
Request interface for streaming objects that a user has a specific relationship with. This request finds all objects of a given type where the specified user has the requested relationship, but returns them as a stream for processing large result sets efficiently. It's useful for building resource lists, dashboards, or any interface that shows what a user can access when dealing with large datasets.
Table of Contents
OpenFGA\Requests
- StreamedListObjectsResponseInterface (response)
- StreamedListObjectsRequest (implementation)
public function getConsistency(): Consistency|null
Get the consistency requirement for this request.
Consistency
| null
— The consistency requirement, or null if not specified
public function getContext(): object|null
Get the context object for this request.
object
| null
— The context object, or null if not specified
public function getContextualTuples(): TupleKeysInterface|null
Get the contextual tuples for this request.
TupleKeysInterface
| null
— The contextual tuples collection, or null if not specified
public function getModel(): string|null
Get the authorization model ID for this request.
string
| null
— The authorization model ID, or null if not specified
public function getRelation(): string
Get the relation name for this request.
string
— The relation name to check
public function getRequest(StreamFactoryInterface $streamFactory): RequestContext
Build a request context for HTTP execution. Transforms the request object into a standardized HTTP request context that can be executed by the OpenFGA HTTP client. This method handles all aspects of request preparation including parameter serialization, URL construction, header configuration, and body stream creation. The method validates that all required parameters are present and properly formatted, serializes complex objects to JSON, constructs the appropriate API endpoint URL, and creates the necessary HTTP message body streams.
Name | Type | Description |
---|---|---|
$streamFactory |
StreamFactoryInterface |
PSR-7 stream factory for creating request body streams from serialized data |
RequestContext
— The prepared request context containing HTTP method, URL, headers, and body ready for execution
public function getStore(): string
Get the store ID for this request.
string
— The store ID
public function getType(): string
Get the object type for this request.
string
— The object type to list
public function getUser(): string
Get the user identifier for this request.
string
— The user identifier