SearchController
extends ApiController
in package
Class SearchController.
Tags
Table of Contents
Properties
- $repository : SearchRepositoryInterface
- $metadata : array<string|int, mixed>
- $metamessage : string|null
Methods
- __construct() : mixed
- addMetadata() : mixed
- alert() : mixed
- error() : JsonResponse
- Error Response.
- getTrendingHashtags() : ResourceCollection
- Display a listing of the resource.
- getUser() : User
- group() : ResourceCollection
- index() : array<string, mixed>|JsonResponse
- Display a listing of the resource.
- info() : JsonResponse
- Info Response.
- keepCacheSuccess() : JsonResponse
- Tell client keep its cache and does not response data.
- message() : mixed
- navigate() : mixed
- success() : JsonResponse
- Success Response.
- suggestion() : JsonResponse
- View Suggestions.
- warning() : JsonResponse
- Warning Response.
- processReturn() : JsonResponse
Properties
$repository
public
SearchRepositoryInterface
$repository
$metadata
private
array<string|int, mixed>
$metadata
= []
$metamessage
private
string|null
$metamessage
= null
Methods
__construct()
public
__construct(SearchRepositoryInterface $repository) : mixed
Parameters
- $repository : SearchRepositoryInterface
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
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
JsonResponsegetTrendingHashtags()
Display a listing of the resource.
public
getTrendingHashtags(TrendingRequest $request) : ResourceCollection
Parameters
- $request : TrendingRequest
Tags
Return values
ResourceCollectiongetUser()
public
getUser() : User
Return values
Usergroup()
public
group(GroupRequest $request) : ResourceCollection
Parameters
- $request : GroupRequest
Return values
ResourceCollectionindex()
Display a listing of the resource.
public
index(IndexRequest $request) : array<string, mixed>|JsonResponse
Parameters
- $request : IndexRequest
Tags
Return values
array<string, mixed>|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
JsonResponsemessage()
public
message(mixed $message) : mixed
Parameters
- $message : mixed
navigate()
public
navigate(string $url[, bool $replace = false ]) : mixed
Parameters
- $url : string
- $replace : bool = false
success()
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
JsonResponsesuggestion()
View Suggestions.
public
suggestion(SuggestionRequest $request) : JsonResponse
Parameters
- $request : SuggestionRequest
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> = []