API Requests CreateStoreRequest - evansims/openfga-php GitHub Wiki
Request for creating a new OpenFGA store. Stores provide data isolation for different applications or environments, maintaining separate authorization models, relationship tuples, and providing complete separation from other stores.
Table of Contents
OpenFGA\Requests
- CreateStoreResponse (response)
- CreateStoreRequestInterface (interface)
public function getName(): string
Get the name for the new store. Returns the human-readable name that will be assigned to the new store. This name is used for identification and administrative purposes and should be descriptive enough to distinguish the store from others in your organization. The store name: - Must be a non-empty string - Should be descriptive and meaningful for administrative purposes - Is used for display in management interfaces and logging - Does not need to be globally unique (the store ID serves that purpose)
string
— The descriptive name for the new authorization store
public function getRequest(Psr\Http\Message\StreamFactoryInterface $streamFactory): OpenFGA\Network\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