Oihana PHP System

Skin uses SkinTrait

The enumeration helper of the data skins.

Table of Contents

Constants

AUDIOS  : string = 'audios'
Projection focused on the audio resources of a document.
COMPACT  : string = 'compact'
Reduced projection exposing only the most essential fields.
DEFAULT  : string = 'default'
The default projection applied when no skin is requested.
EXTEND  : string = 'extend'
Extended projection enriching the default set with extra fields.
FULL  : string = 'full'
Full projection exposing every public field of the document.
INTERNAL  : string = 'internal'
Internal projection — exposes server-only fields that must NEVER leak through the public HTTP surface (e.g. the SHA-256 of the pending-email verification code on `User`).
LIST  : string = 'list'
Projection optimized for list/collection rendering.
MAIN  : string = 'main'
Projection exposing the main fields of the document.
MAP  : string = 'map'
Projection focused on the geographic/map data of a document.
NORMAL  : string = 'normal'
The standard projection of a document.
PHOTOS  : string = 'photos'
Projection focused on the photo resources of a document.
SEARCH  : string = 'search'
Projection optimized for search-result rendering.
VIDEOS  : string = 'videos'
Projection focused on the video resources of a document.

Constants

AUDIOS

Projection focused on the audio resources of a document.

public string AUDIOS = 'audios'

COMPACT

Reduced projection exposing only the most essential fields.

public string COMPACT = 'compact'

DEFAULT

The default projection applied when no skin is requested.

public string DEFAULT = 'default'

EXTEND

Extended projection enriching the default set with extra fields.

public string EXTEND = 'extend'

FULL

Full projection exposing every public field of the document.

public string FULL = 'full'

INTERNAL

Internal projection — exposes server-only fields that must NEVER leak through the public HTTP surface (e.g. the SHA-256 of the pending-email verification code on `User`).

public string INTERNAL = 'internal'

Invariant — do NOT register Skin::INTERNAL in any controller's Arango::SKINS list. Doing so would expose the underlying fields via ?skin=internal on a public route. The controller's PrepareSkin::isValidSkin() filter rejects any skin not in that list and falls back to the default — so as long as INTERNAL stays out of the list, no HTTP caller can request it. This is the security guarantee.

No matching Casbin permission exists, by design. Granting one (e.g. users:skin.internal) would let a superadmin attribute it to a user via POST /users/{id}/permissions/{permKey} and break the invariant. If a future use-case really needs HTTP access to an internal-projected document (admin debug tool, audit page), introduce a dedicated permission AND a Capability::PARAMS gate AND a hardcoded whitelist preventing the permission from being attributed in the first place — all three layers, not just one.

Server-side traits call model->get([SKIN => INTERNAL]) directly. The capability framework lives on the HTTP controller layer, not on the model — direct model calls are therefore not gated, by design. They remain trusted because they originate from server PHP code.

LIST

Projection optimized for list/collection rendering.

public string LIST = 'list'

MAIN

Projection exposing the main fields of the document.

public string MAIN = 'main'

MAP

Projection focused on the geographic/map data of a document.

public string MAP = 'map'

NORMAL

The standard projection of a document.

public string NORMAL = 'normal'

PHOTOS

Projection focused on the photo resources of a document.

public string PHOTOS = 'photos'

Projection optimized for search-result rendering.

public string SEARCH = 'search'

VIDEOS

Projection focused on the video resources of a document.

public string VIDEOS = 'videos'
On this page

Search results