API Models UsersetTree - evansims/openfga-php GitHub Wiki
Represents the evaluation tree for determining user access. When OpenFGA evaluates whether a user has access to an object, it builds a tree structure showing all the authorization paths that were considered. The UsersetTree contains this evaluation tree with a root node that represents the starting point of the access evaluation. This is primarily used for debugging authorization decisions and understanding why access was granted or denied in complex permission scenarios.
Table of Contents
OpenFGA\Models
UsersetTreeInterface
JsonSerializable
ModelInterface
- UsersetTreeInterface (interface)
Name | Value | Description |
---|---|---|
OPENAPI_MODEL |
UsersetTree |
public function getRoot(): OpenFGA\Models\NodeInterface
Get the root node of the userset tree structure. This returns the top-level node that represents the entry point for userset expansion. The tree structure allows for complex authorization logic including unions, intersections, and difference operations.
NodeInterface
— The root node of the userset tree
public function jsonSerialize(): array
array
Implements Models\UsersetTreeInterface
public function schema(): SchemaInterface
Get the schema definition for this model. This method returns the schema that defines the structure, validation rules, and serialization behavior for this model class. The schema is used for data validation, transformation, and ensuring consistency across API operations with the OpenFGA service. Each model's schema defines: - Required and optional properties - Data types and format constraints - Nested object relationships - Validation rules and business logic constraints The schema system enables the SDK to automatically validate incoming data, transform between different representations, and ensure compliance with the OpenFGA API specification.
SchemaInterface
— The schema definition containing validation rules and property specifications for this model