MetaFox

ResourceGate extends Facade
in package

Class ResourceGate.

Tags
link
\MetaFox\Platform\ApiResourceManager::setVersion

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|null

asEmbed()

public static asEmbed(mixed $model, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
$model : mixed
$checkPrivacy = 'view' : mixed
Return values
JsonResource|null

asItem()

public static asItem(mixed $model, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
$model : mixed
$checkPrivacy = 'view' : mixed
Return values
JsonResource|null

asJson()

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>|null

asResource()

public static asResource(mixed $model, mixed $variant, mixed $checkPrivacy = 'view') : JsonResource|null
Parameters
$model : mixed
$variant : mixed
$checkPrivacy = 'view' : mixed
Return values
JsonResource|null

detail()

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>|null

embed()

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>|null

embeds()

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>|null

getItem()

public static getItem(mixed $itemType, mixed $itemId) : mixed
Parameters
$itemType : mixed
$itemId : mixed

getMajorVersion()

public static getMajorVersion() : string
Return values
string

getVersion()

public static getVersion() : string
Return values
string

item()

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>|null

items()

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>|null

pickNearestVersion()

public static pickNearestVersion(array<string|int, mixed> $versions) : string|null
Parameters
$versions : array<string|int, mixed>
Return values
string|null

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|null

toResource()

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|null

user()

public static user(mixed $model) : array<string|int, mixed>
Parameters
$model : mixed
Return values
array<string|int, mixed>

getFacadeAccessor()

protected static getFacadeAccessor() : mixed

        
On this page

Search results