ResourceGate
extends Facade
in package
Class ResourceGate.
Tags
Table of Contents
Methods
- asDetail() : JsonResource|null
- asEmbed() : JsonResource|null
- asItem() : JsonResource|null
- asJson() : array<string|int, mixed>|null
- asResource() : JsonResource|null
- detail() : array<string|int, mixed>|null
- embed() : array<string|int, mixed>|null
- embeds() : array<string|int, mixed>|null
- getItem() : mixed
- getMajorVersion() : string
- getVersion() : string
- item() : array<string|int, mixed>|null
- items() : array<string|int, mixed>|null
- pickNearestVersion() : string|null
- presentAs() : void
- setVersion() : void
- toItem() : JsonResource|null
- toResource() : JsonResource|null
- user() : array<string|int, mixed>
- getFacadeAccessor() : mixed
Methods
asDetail()
public
static asDetail(mixed $model, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
- $model : mixed
- $checkPrivacy = 'view' : mixed
Return values
JsonResource|nullasEmbed()
public
static asEmbed(mixed $model, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
- $model : mixed
- $checkPrivacy = 'view' : mixed
Return values
JsonResource|nullasItem()
public
static asItem(mixed $model, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
- $model : mixed
- $checkPrivacy = 'view' : mixed
Return values
JsonResource|nullasJson()
public
static asJson(mixed $model, mixed $variant, mixed $checkPrivacy = 'view') : array<string|int, mixed>|null
Parameters
- $model : mixed
- $variant : mixed
- $checkPrivacy = 'view' : mixed
Return values
array<string|int, mixed>|nullasResource()
public
static asResource(mixed $model, mixed $variant, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
- $model : mixed
- $variant : mixed
- $checkPrivacy = 'view' : mixed
Return values
JsonResource|nulldetail()
public
static detail(mixed $model, mixed $checkPrivacy = 'view') : array<string|int, mixed>|null
Parameters
- $model : mixed
- $checkPrivacy = 'view' : mixed
Return values
array<string|int, mixed>|nullembed()
public
static embed(mixed $model, mixed $checkPrivacy = 'view') : array<string|int, mixed>|null
Parameters
- $model : mixed
- $checkPrivacy = 'view' : mixed
Return values
array<string|int, mixed>|nullembeds()
public
static embeds(ArrayAccess $items, mixed $checkPrivacy = 'view') : array<string|int, mixed>|null
Parameters
- $items : ArrayAccess
- $checkPrivacy = 'view' : mixed
Return values
array<string|int, mixed>|nullgetItem()
public
static getItem(mixed $itemType, mixed $itemId) : mixed
Parameters
- $itemType : mixed
- $itemId : mixed
getMajorVersion()
public
static getMajorVersion() : string
Return values
stringgetVersion()
public
static getVersion() : string
Return values
stringitem()
public
static item(mixed $model, mixed $checkPrivacy = 'view') : array<string|int, mixed>|null
Parameters
- $model : mixed
- $checkPrivacy = 'view' : mixed
Return values
array<string|int, mixed>|nullitems()
public
static items(ArrayAccess $items, mixed $checkPrivacy = 'view') : array<string|int, mixed>|null
Parameters
- $items : ArrayAccess
- $checkPrivacy = 'view' : mixed
Return values
array<string|int, mixed>|nullpickNearestVersion()
public
static pickNearestVersion(array<string|int, mixed> $versions) : string|null
Parameters
- $versions : array<string|int, mixed>
Return values
string|nullpresentAs()
public
static presentAs() : void
setVersion()
public
static setVersion(mixed $version) : void
Parameters
- $version : mixed
toItem()
public
static toItem(mixed $itemType, mixed $itemId, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
- $itemType : mixed
- $itemId : mixed
- $checkPrivacy = 'view' : mixed
Return values
JsonResource|nulltoResource()
public
static toResource(mixed $variant, mixed $itemType, mixed $itemId, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
- $variant : mixed
- $itemType : mixed
- $itemId : mixed
- $checkPrivacy = 'view' : mixed
Return values
JsonResource|nulluser()
public
static user(mixed $model) : array<string|int, mixed>
Parameters
- $model : mixed
Return values
array<string|int, mixed>getFacadeAccessor()
protected
static getFacadeAccessor() : mixed