MetaFox

UserPreview extends JsonResource
in package
Uses UserStatisticTrait, UserLocationTrait, ExtraTrait

Class UserPreview.

Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Table of Contents

Properties

$resource  : User

Methods

canViewLocation()  : bool
getExtra()  : array<string|int, mixed>
getExtraAttributes()  : array<string|int, mixed>
getLocation()  : array<string, mixed>
getLocationValue()  : string
toArray()  : array<string, mixed>
Transform the resource collection into an array.
getStatistic()  : array<string, mixed>

Properties

Methods

getExtra()

public getExtra([mixed $resolution = null ]) : array<string|int, mixed>
Parameters
$resolution : mixed = null
Return values
array<string|int, mixed>

getExtraAttributes()

public getExtraAttributes(User $context) : array<string|int, mixed>
Parameters
$context : User
Return values
array<string|int, mixed>

getLocation()

public getLocation(User $context, User $resource) : array<string, mixed>
Parameters
$context : User
$resource : User
Return values
array<string, mixed>

getLocationValue()

public getLocationValue(User $context, mixed $resource) : string
Parameters
$context : User
$resource : mixed
Return values
string

toArray()

Transform the resource collection into an array.

public toArray(Request $request) : array<string, mixed>
Parameters
$request : Request
Tags
throws
AuthenticationException
Return values
array<string, mixed>

getStatistic()

protected getStatistic() : array<string, mixed>
Tags
throws
AuthenticationException
Return values
array<string, mixed>

        
On this page

Search results