API Network RequestManagerFactory - evansims/openfga-php GitHub Wiki

Factory for creating RequestManager instances. This factory encapsulates the creation of RequestManager instances with the appropriate configuration for different use cases (normal requests vs batch operations).

Table of Contents


Namespace

OpenFGA\Network


Source

View source code


Methods

create

public function create(): RequestManager

Create a RequestManager for normal operations.

View source


Returns

RequestManager — A RequestManager configured with default retry settings


createForBatch

public function createForBatch(): RequestManager

Create a RequestManager for batch operations (no HTTP retries).

View source


Returns

RequestManager — A RequestManager configured with retries disabled


createWithRetries

public function createWithRetries(int $maxRetries): RequestManager

Create a RequestManager with custom retry configuration.

View source


Parameters

Name Type Description
$maxRetries int Maximum number of retry attempts

Returns

RequestManager — A RequestManager configured with the specified retry limit

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