API Models UsersetTreeInterface - evansims/openfga-php GitHub Wiki

Defines a tree structure for representing complex userset operations. UsersetTree provides a hierarchical representation of authorization evaluation logic, where each node can contain unions, intersections, differences, computed usersets, or tuple-to-userset operations. This tree structure enables OpenFGA to represent and evaluate sophisticated authorization patterns efficiently. Use this interface when working with authorization evaluation trees returned by expand operations or when implementing custom authorization logic that needs to traverse userset structures.

Table of Contents


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Methods

getRoot

public function getRoot(): 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<string, mixed>

View source


Returns

array&lt;string, mixed&gt;

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