Oihana PHP System

UserProfileTrait

Defines the custom property names of the {@see \xyz\oihana\schema\business\UserProfile} schema entity.

Centralizing these keys avoids hardcoded string literals and provides a single source of truth for hydration and serialization.

Note — like BusinessIdentityTrait, this trait is intentionally not aggregated into the global Oihana constants class : its generic ROLE key is scoped to the entity to avoid ambiguity with the auth Role vocabulary. It is composed directly by the UserProfile entity instead.

Typical usage:

$profile[ UserProfileTrait::ROLE ] = 'seller' ;
Tags
author

Marc Alcaraz (ekameleon)

since
1.0.2

Table of Contents

Constants

COLOR  : string = 'color'
A display color for the profile (UI hint).
EXPECTED_TYPE  : string = 'expectedType'
The expected `additionalType` of the linked person (e.g. `"Seller"`).
ROLE  : string = 'role'
The authorization role granted to accounts created from this profile.

Constants

COLOR

A display color for the profile (UI hint).

public string COLOR = 'color'

Related model property:

public ?string $color ;

EXPECTED_TYPE

The expected `additionalType` of the linked person (e.g. `"Seller"`).

public string EXPECTED_TYPE = 'expectedType'

Related model property:

public ?string $expectedType ;

ROLE

The authorization role granted to accounts created from this profile.

public string ROLE = 'role'

Related model property:

public null|string|Role $role ;
On this page

Search results