Documentation

ApiController extends ControllerBase
in package

Provide actions to search, create, update and delete models data and autocompletion on field data search

Table of Contents

$messages  : array<string|int, mixed>
Current lang translated texts
$camelize  : Camelize
Object to camelize strings
$models  : array<string|int, mixed>
Current request models
$uncamelize  : Uncamelize
Object to uncamelize strings
_()  : string
Get a translation by his label in global context
__()  : string
Get a translation by his label in controller/action context
beforeExecuteRoute()  : void
Check url models conformity
completeAction()  : void
Autocomplete models field data search
createAction()  : void
Create models entry
deleteAction()  : void
Delete models entry
findAction()  : void
Get models result filtered by conditions
getTypeAction()  : void
Get the type of models column
updateAction()  : void
Update models entry

Properties

$messages

Current lang translated texts

public array<string|int, mixed> $messages = []

$camelize

Object to camelize strings

private Camelize $camelize

$models

Current request models

private array<string|int, mixed> $models = []

$uncamelize

Object to uncamelize strings

private Uncamelize $uncamelize

Methods

_()

Get a translation by his label in global context

public _(string $key[, null|array<string|int, mixed> $params = [] ]) : string
Parameters
$key : string

Label of the text

$params : null|array<string|int, mixed> = []
Tags
example

__("hi-name", ["name" => $name])?>

Return values
string

Text translated in the correct lang

__()

Get a translation by his label in controller/action context

public __(string $key[, null|array<string|int, mixed> $params = [] ]) : string
Parameters
$key : string

Label of the text

$params : null|array<string|int, mixed> = []
Tags
example

__("hi-name", ["name" => $name])?>

Return values
string

Text translated in the correct lang

beforeExecuteRoute()

Check url models conformity

public beforeExecuteRoute(Dispatcher $dispatcher) : void
Parameters
$dispatcher : Dispatcher

Application dispatcher

Return values
void

completeAction()

Autocomplete models field data search

public completeAction() : void
Return values
void

createAction()

Create models entry

public createAction() : void
Return values
void

deleteAction()

Delete models entry

public deleteAction() : void
Return values
void

findAction()

Get models result filtered by conditions

public findAction() : void
Return values
void

getTypeAction()

Get the type of models column

public getTypeAction() : void
Return values
void

updateAction()

Update models entry

public updateAction() : void
Return values
void

Search results