FacturaScripts

ApiController
in package
implements ControllerInterface

AbstractYes

Table of Contents

Interfaces

ControllerInterface
Define el contrato básico de los controladores ejecutados por el kernel.

Constants

API_VERSION  : mixed = 3
INCIDENT_EXPIRATION_TIME  : mixed = 600
IP_LIST  : mixed = 'api-ip-list'
MAX_INCIDENT_COUNT  : mixed = 5

Properties

$apiKey  : ApiKey
$request  : Request
$response  : Response
$url  : string
$dataBase  : DataBase

Methods

__construct()  : mixed
Inicializa el controlador asociado a una ruta.
getPageData()  : array<string|int, mixed>
Devuelve los metadatos de la página, como el nombre, título, icono y ubicación en el menú.
run()  : void
Ejecuta el ciclo principal del controlador para procesar la petición actual.
db()  : DataBase
getUriParam()  : string
runResource()  : void
clientHasManyIncidents()  : bool
getIpList()  : array<string|int, mixed>
isAllowed()  : bool
saveIncident()  : void
validateApiToken()  : bool

Constants

INCIDENT_EXPIRATION_TIME

public mixed INCIDENT_EXPIRATION_TIME = 600

Properties

Methods

__construct()

Inicializa el controlador asociado a una ruta.

public __construct(string $className[, string $url = '' ]) : mixed
Parameters
$className : string

Nombre de la clase final del controlador.

$url : string = ''

Ruta solicitada por el usuario.

getPageData()

Devuelve los metadatos de la página, como el nombre, título, icono y ubicación en el menú.

public getPageData() : array<string|int, mixed>

Este método se consulta durante la construcción y no debe depender de que el usuario esté autenticado.

Return values
array<string|int, mixed>

run()

Ejecuta el ciclo principal del controlador para procesar la petición actual.

public run() : void

El kernel invoca este método una vez después de construir el controlador.

getUriParam()

protected getUriParam(string $num) : string
Parameters
$num : string
Return values
string

clientHasManyIncidents()

private clientHasManyIncidents() : bool
Return values
bool

getIpList()

private getIpList() : array<string|int, mixed>
Return values
array<string|int, mixed>

isAllowed()

private isAllowed(string $resource) : bool
Parameters
$resource : string
Return values
bool

validateApiToken()

private validateApiToken(string $token) : bool
Parameters
$token : string
Return values
bool
On this page

Search results