API Models TypedWildcard - evansims/openfga-php GitHub Wiki

Represents a wildcard that matches all users of a specific type. In authorization models, you sometimes want to grant permissions to all users of a certain type rather than specific individuals. TypedWildcard lets you specify "all users of type X" in your authorization rules. For example, you might want to grant read access to "all employees" or "all customers" without having to list each individual user.

Table of Contents


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Constants

Name Value Description
OPENAPI_MODEL TypedWildcard


Methods

getType

public function getType(): string

Get the object type that this wildcard represents. This returns the type name for which the wildcard grants access to all users of that type. For example, "user" would represent all users, "group" would represent all groups, etc.

View source


Returns

string — The object type that this wildcard represents


jsonSerialize

public function jsonSerialize(): array

View source


Returns

array


schema

Implements Models\TypedWildcardInterface

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** ⚠️