PhotoController
extends ApiController
in package
Class PhotoController.
Tags
Table of Contents
Properties
- $repository : PhotoRepositoryInterface
- $metadata : array<string|int, mixed>
- $metamessage : string|null
Methods
- __construct() : mixed
- addMetadata() : mixed
- alert() : mixed
- approve() : JsonResponse
- deleteTaggedFriend() : JsonResponse
- destroy() : JsonResponse
- Remove the specified resource from storage.
- download() : BinaryFileResponse
- Display the specified resource.
- edit() : mixed
- error() : JsonResponse
- Error Response.
- feature() : JsonResponse
- form() : JsonResponse
- getTaggedFriends() : PhotoTaggedFriendCollection<string|int, PhotoTaggedFriend>
- getUser() : User
- index() : JsonResponse
- Display a listing of the resource.
- info() : JsonResponse
- Info Response.
- keepCacheSuccess() : JsonResponse
- Tell client keep its cache and does not response data.
- makeParentAvatar() : JsonResponse
- makeParentCover() : JsonResponse
- makeProfileAvatar() : JsonResponse
- makeProfileCover() : JsonResponse
- message() : mixed
- navigate() : mixed
- show() : PhotoDetail
- Display the specified resource.
- sponsor() : JsonResponse
- sponsorInFeed() : JsonResponse
- store() : JsonResponse
- Store a newly created resource in storage.
- success() : JsonResponse
- Success Response.
- tagFriend() : JsonResponse|PhotoTaggedFriend
- update() : JsonResponse
- Update the specified resource in storage.
- warning() : JsonResponse
- Warning Response.
- processReturn() : JsonResponse
Properties
$repository
public
PhotoRepositoryInterface
$repository
$metadata
private
array<string|int, mixed>
$metadata
= []
$metamessage
private
string|null
$metamessage
= null
Methods
__construct()
public
__construct(PhotoRepositoryInterface $repository) : mixed
Parameters
- $repository : PhotoRepositoryInterface
addMetadata()
public
addMetadata([array<string|int, mixed>|null $meta = [] ]) : mixed
Parameters
- $meta : array<string|int, mixed>|null = []
alert()
public
alert(mixed $alert) : mixed
Parameters
- $alert : mixed
approve()
public
approve(int $id) : JsonResponse
Parameters
- $id : int
Tags
Return values
JsonResponsedeleteTaggedFriend()
public
deleteTaggedFriend(int $tagId) : JsonResponse
Parameters
- $tagId : int
Tags
Return values
JsonResponsedestroy()
Remove the specified resource from storage.
public
destroy(int $id) : JsonResponse
Parameters
- $id : int
Tags
Return values
JsonResponsedownload()
Display the specified resource.
public
download(int $id) : BinaryFileResponse
Parameters
- $id : int
Tags
Return values
BinaryFileResponseedit()
public
edit(mixed $id) : mixed
Parameters
- $id : mixed
error()
Error Response.
public
error([string $error = '' ][, int $code = 400 ][, array<string|int, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $error : string = ''
- $code : int = 400
- $headers : array<string|int, mixed> = []
- $options : int = 0
Return values
JsonResponsefeature()
public
feature(FeatureRequest $request, int $id) : JsonResponse
Parameters
- $request : FeatureRequest
- $id : int
Tags
Return values
JsonResponseform()
public
form(UploadFormRequest $request[, int|null $id = null ]) : JsonResponse
Parameters
- $request : UploadFormRequest
- $id : int|null = null
Tags
Return values
JsonResponsegetTaggedFriends()
public
getTaggedFriends(GetTaggedRequest $request) : PhotoTaggedFriendCollection<string|int, PhotoTaggedFriend>
Parameters
- $request : GetTaggedRequest
Tags
Return values
PhotoTaggedFriendCollection<string|int, PhotoTaggedFriend>getUser()
public
getUser() : User
Return values
Userindex()
Display a listing of the resource.
public
index(IndexRequest $request) : JsonResponse
Parameters
- $request : IndexRequest
Tags
Return values
JsonResponseinfo()
Info Response.
public
info([object|array<string|int, mixed>|null $data = [] ][, array<string, mixed> $extra = [] ][, array<string|int, mixed>|string|null $message = null ][, int $code = 200 ][, array<string, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $data : object|array<string|int, mixed>|null = []
- $extra : array<string, mixed> = []
- $message : array<string|int, mixed>|string|null = null
- $code : int = 200
- $headers : array<string, mixed> = []
- $options : int = 0
Return values
JsonResponsekeepCacheSuccess()
Tell client keep its cache and does not response data.
public
keepCacheSuccess([array<string|int, mixed> $data = [] ]) : JsonResponse
Parameters
- $data : array<string|int, mixed> = []
Return values
JsonResponsemakeParentAvatar()
public
makeParentAvatar(int $id) : JsonResponse
Parameters
- $id : int
Tags
Return values
JsonResponsemakeParentCover()
public
makeParentCover(int $id) : JsonResponse
Parameters
- $id : int
Tags
Return values
JsonResponsemakeProfileAvatar()
public
makeProfileAvatar(int $id) : JsonResponse
Parameters
- $id : int
Tags
Return values
JsonResponsemakeProfileCover()
public
makeProfileCover(MakeCoverRequest $request, int $id) : JsonResponse
Parameters
- $request : MakeCoverRequest
- $id : int
Tags
Return values
JsonResponsemessage()
public
message(mixed $message) : mixed
Parameters
- $message : mixed
navigate()
public
navigate(string $url[, bool $replace = false ]) : mixed
Parameters
- $url : string
- $replace : bool = false
show()
Display the specified resource.
public
show(int $id) : PhotoDetail
Parameters
- $id : int
Tags
Return values
PhotoDetailsponsor()
public
sponsor(SponsorRequest $request, int $id) : JsonResponse
Parameters
- $request : SponsorRequest
- $id : int
Tags
Return values
JsonResponsesponsorInFeed()
public
sponsorInFeed(SponsorInFeedRequest $request, int $id) : JsonResponse
Parameters
- $request : SponsorInFeedRequest
- $id : int
Tags
Return values
JsonResponsestore()
Store a newly created resource in storage.
public
store(StoreRequest $request) : JsonResponse
Parameters
- $request : StoreRequest
Tags
Return values
JsonResponsesuccess()
Success Response.
public
success([object|array<string|int, mixed>|null $data = [] ][, array<string, mixed> $meta = [] ][, array<string|int, mixed>|string|null $message = null ][, int $code = 200 ][, array<string, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $data : object|array<string|int, mixed>|null = []
- $meta : array<string, mixed> = []
- $message : array<string|int, mixed>|string|null = null
- $code : int = 200
- $headers : array<string, mixed> = []
- $options : int = 0
Return values
JsonResponsetagFriend()
public
tagFriend(PhotoTagRequest $request) : JsonResponse|PhotoTaggedFriend
Parameters
- $request : PhotoTagRequest
Tags
Return values
JsonResponse|PhotoTaggedFriendupdate()
Update the specified resource in storage.
public
update(UpdateRequest $request, int $id) : JsonResponse
Parameters
- $request : UpdateRequest
- $id : int
Tags
Return values
JsonResponsewarning()
Warning Response.
public
warning([object|array<string|int, mixed>|null $data = [] ][, array<string, mixed> $extra = [] ][, array<string|int, mixed>|string|null $message = null ][, int $code = 200 ][, array<string, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $data : object|array<string|int, mixed>|null = []
- $extra : array<string, mixed> = []
- $message : array<string|int, mixed>|string|null = null
- $code : int = 200
- $headers : array<string, mixed> = []
- $options : int = 0
Return values
JsonResponseprocessReturn()
private
processReturn(string $status, mixed|object $data[, array<string|int, mixed>|string|null $message = null ][, string|null $error = null ][, int $code = 200 ][, array<string|int, mixed> $headers = [] ][, int $options = JSON_PRETTY_PRINT ][, array<string|int, mixed> $meta = [] ]) : JsonResponse
Parameters
- $status : string
- $data : mixed|object
- $message : array<string|int, mixed>|string|null = null
- $error : string|null = null
- $code : int = 200
- $headers : array<string|int, mixed> = []
- $options : int = JSON_PRETTY_PRINT
- $meta : array<string|int, mixed> = []