API Responses ListStoresResponse - evansims/openfga-php GitHub Wiki

Response containing a paginated list of available stores. This response provides access to stores that the authenticated user or application can access, with pagination support for handling large numbers of stores. Each store includes its ID, name, and creation metadata.

Table of Contents


Namespace

OpenFGA\Responses


Source

View source code


Implements


Related Classes


Methods

fromResponse

Implements Responses\ListStoresResponseInterface

public function fromResponse(
    HttpResponseInterface $response,
    HttpRequestInterface $request,
    SchemaValidatorInterface $validator,
): static

Create a response instance from an HTTP response. This method transforms a raw HTTP response from the OpenFGA API into a structured response object, validating and parsing the response data according to the expected schema. It handles both successful responses by parsing and validating the data, and error responses by throwing appropriate exceptions.

View source


Parameters

Name Type Description
$response HttpResponseInterface The raw HTTP response from the OpenFGA API
$request HttpRequestInterface The original HTTP request that generated this response
$validator SchemaValidatorInterface Schema validator for parsing and validating response data

Returns

static — The parsed and validated response instance containing the API response data


getContinuationToken

public function getContinuationToken(): ?string

Get the continuation token for pagination. Returns a token that can be used to retrieve the next page of results when the total number of stores exceeds the page size limit. If null, there are no more results to fetch.

View source


Returns

string | null — The continuation token for fetching more results, or null if no more pages exist


getStores

public function getStores(): OpenFGA\Models\Collections\StoresInterface

Get the collection of stores. Returns a type-safe collection containing the store objects from the current page of results. Each store includes its metadata such as ID, name, and timestamps.

View source


Returns

StoresInterface — The collection of stores


schema

Implements Responses\ListStoresResponseInterface

public function schema(): SchemaInterface

Get the schema definition for this response. Returns the schema that defines the structure and validation rules for store listing response data, ensuring consistent parsing and validation of API responses.

View source


Returns

SchemaInterface — The schema definition for response validation

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