-
Notifications
You must be signed in to change notification settings - Fork 5
API Models BatchTupleResultInterface
Interface for batch tuple operation results. Defines the contract for tracking and analyzing the results of batch tuple operations, including success rates, responses, and error handling.
Table of Contents
OpenFGA\Models
ModelInterfaceJsonSerializable
- BatchTupleResult (implementation)
public function getErrors(): array<Throwable>Get all errors from failed chunks.
array<Throwable> — Errors from failed API calls
public function getFailedChunks(): intGet the number of chunks that failed.
int — Number of failed API requests
public function getFirstError(): Throwable|nullGet the first error that occurred.
Throwable | null — The first error, or null if no errors occurred
public function getResponses(): array<mixed>Get all successful responses from completed chunks.
array<mixed> — Responses from successful API calls
public function getSuccessRate(): floatCalculate the success rate as a percentage.
float — Success rate from 0.0 to 1.0
public function getSuccessfulChunks(): intGet the number of chunks that completed successfully.
int — Number of successful API requests
public function getTotalChunks(): intGet the total number of chunks that were processed.
int — Number of API requests made
public function getTotalOperations(): intGet the total number of tuple operations that were requested.
int — Total operations across all chunks
public function isCompleteFailure(): boolCheck if all chunks failed.
bool — True if no chunks succeeded
public function isCompleteSuccess(): boolCheck if all chunks completed successfully.
bool — True if no chunks failed
public function isPartialSuccess(): boolCheck if some chunks succeeded and some failed.
bool — True if there were both successes and failures
public function jsonSerialize()public function throwOnFailure(): voidThrow an exception if any chunks failed. If there were failures, throws the first error that occurred. This is useful for treating partial failures as complete failures when strict error handling is required.
void
Getting Started: Introduction • Installation • Authentication
Essentials: Stores • Authorization Models • Relationship Tuples • Permissions Queries
Features: Helper Functions • Concurrency • Results • Exceptions • Observability • Integration
- API Reference - Full class and method documentation
- Quickstart - Get up and running in minutes
- Helpers - Convenient shortcuts for common operations
- Testing Guide - Unit testing with the SDK
- Performance Guide - Optimize for high-scale applications
- Report Issues - Bug reports and feature requests
- Discussions - Community support and questions
- Contributing - Help improve the SDK
- Changelog - Latest updates and releases
- OpenFGA Documentation - Official OpenFGA documentation
- OpenFGA Playground - Interactive modeling environment
- Authorization Concepts - Learn relationship-based access control
- Other SDKs - JavaScript, Go, Python, .NET, and more
OpenFGA PHP SDK • Apache 2.0 License
- Authorization Stores
- Authorization Models
- Relationship Tuples
- Permission Queries
- Testing with Assertions
- Helper Functions
- Concurrency
- Error Handling
- Framework Integration
- OpenTelemetry Observability
- Result Pattern
- Event Dispatcher
- HTTP Request Sent Event
- HTTP Response Received Event
- Operation Started Event
- Operation Completed Event
- More Events …
- Authentication Exception
- Client Exception
- Configuration Exception
- Network Exception
- Serialization Exception
- More Exceptions …
- Request Manager
- Request Context
- Circuit Breaker
- Parallel Task Executor
- Fiber Concurrent Executor
- Simple Concurrent Executor
- Retry Handler
- Exponential Backoff Retry Strategy
- More Networking …