API Models MetadataInterface - evansims/openfga-php GitHub Wiki

Represents metadata associated with OpenFGA authorization model components. Metadata provides additional context and configuration information for authorization model elements. This includes module organization, relation-specific metadata, and source code information for debugging and development purposes. Metadata helps with model organization, documentation, and tooling support for complex authorization models.

Table of Contents


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Methods

getModule

public function getModule(): string|null

Get the module name for this metadata. Modules provide a way to organize and namespace authorization model components, similar to packages in programming languages. This helps with model organization and prevents naming conflicts in large authorization systems.

View source


Returns

string | null — The module name, or null if not specified


getRelations

public function getRelations(): RelationMetadataCollection|null

Get the collection of relation metadata. Relation metadata provides additional configuration and context for specific relations within a type definition. This can include documentation, constraints, or other relation-specific settings that enhance the authorization model.

View source


Returns

RelationMetadataCollection | null — The relation metadata collection, or null if not specified


getSourceInfo

public function getSourceInfo(): SourceInfoInterface|null

Get the source code information for this metadata. Source information provides debugging and development context by tracking where authorization model elements were defined. This is particularly useful for development tools and error reporting.

View source


Returns

SourceInfoInterface | null — The source information, or null if not available


jsonSerialize

public function jsonSerialize(): array

View source


Returns

array

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