Arikaim CMS

Search extends FastApiController
in package

Search Api controller

Table of Contents

Properties

$container  : Container|null
Container
$errors  : array<string|int, mixed>
Errors list
$response  : ResponseInterface|null
Response
$result  : array<string|int, mixed>
Response result

Methods

__construct()  : mixed
Constructor
addError()  : void
Add error
clearResult()  : void
Clear result
clearSearch()  : ResponseInterface
Delete all search conditions
field()  : self
Set result field
fields()  : self
Set fields
getResponse()  : ResponseInterface
Return response
getResponseJson()  : string
Return json
getSearch()  : ResponseInterface
Set search conditions
hasError()  : bool
Return true if response have error
setHttpResponse()  : void
Set http response instance
setResponse()  : mixed
Set response
setResult()  : self
Set response result
setResultField()  : void
Set field to result array
setResultFields()  : void
Set result filelds
setSearch()  : ResponseInterface
Set search conditions

Properties

$result

Response result

protected array<string|int, mixed> $result

Methods

__construct()

Constructor

public __construct([Container|null $container = null ]) : mixed
Parameters
$container : Container|null = null

addError()

Add error

public addError(string $message) : void
Parameters
$message : string

clearResult()

Clear result

public clearResult() : void

clearSearch()

Delete all search conditions

public clearSearch(ServerRequestInterface $request, ResponseInterface $response, Validator $data) : ResponseInterface
Parameters
$request : ServerRequestInterface
$response : ResponseInterface
$data : Validator
Return values
ResponseInterface

field()

Set result field

public field(string $name, mixed $value) : self
Parameters
$name : string
$value : mixed
Return values
self

fields()

Set fields

public fields(array<string|int, mixed> $data[, string|null $filedName = null ]) : self
Parameters
$data : array<string|int, mixed>
$filedName : string|null = null
Return values
self

getResponse()

Return response

public getResponse([bool $raw = false ][, ResponseInterface|null $response = null ][, bool $progress = false ]) : ResponseInterface
Parameters
$raw : bool = false
$response : ResponseInterface|null = null
$progress : bool = false
Return values
ResponseInterface

getResponseJson()

Return json

public getResponseJson([bool $raw = false ]) : string
Parameters
$raw : bool = false
Return values
string

getSearch()

Set search conditions

public getSearch(ServerRequestInterface $request, ResponseInterface $response, Validator $data) : ResponseInterface
Parameters
$request : ServerRequestInterface
$response : ResponseInterface
$data : Validator
Return values
ResponseInterface

hasError()

Return true if response have error

public hasError() : bool
Return values
bool

setHttpResponse()

Set http response instance

public setHttpResponse(ResponseInterface $response) : void
Parameters
$response : ResponseInterface

setResponse()

Set response

public setResponse(mixed $condition, array<string|int, mixed>|string|Closure $data, string|Closure $error) : mixed
Parameters
$condition : mixed
$data : array<string|int, mixed>|string|Closure
$error : string|Closure

setResult()

Set response result

public setResult(mixed $data) : self
Parameters
$data : mixed
Return values
self

setResultField()

Set field to result array

public setResultField(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

setResultFields()

Set result filelds

public setResultFields(array<string|int, mixed> $values[, string|null $filedName = null ]) : void
Parameters
$values : array<string|int, mixed>
$filedName : string|null = null

setSearch()

Set search conditions

public setSearch(ServerRequestInterface $request, ResponseInterface $response, Validator $data) : ResponseInterface
Parameters
$request : ServerRequestInterface
$response : ResponseInterface
$data : Validator
Return values
ResponseInterface

        
On this page

Search results