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
OpenFGA\Models
ModelInterface
JsonSerializable
- UsersetTree (implementation)
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.
NodeInterface
— The root node of the userset tree
public function jsonSerialize(): array<string, mixed>
array<
string,
mixed>