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


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Constants

Name Value Description
OPENAPI_MODEL UsersetTree


Methods

getRoot

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.

View source


Returns

NodeInterface — The root node of the userset tree


jsonSerialize

public function jsonSerialize(): array

View source


Returns

array


schema

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.

View source


Returns

SchemaInterface — The schema definition containing validation rules and property specifications for this model

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