ApiProductoImagen
extends ApiController
in package
Controlador de la API para gestionar las imágenes de los productos.
Table of Contents
Constants
- API_VERSION : mixed = 3
- INCIDENT_EXPIRATION_TIME : mixed = 600
- IP_LIST : mixed = 'api-ip-list'
- MAX_INCIDENT_COUNT : mixed = 5
Properties
Methods
- __construct() : mixed
- Inicializa el controlador asociado a una ruta.
- doDELETE() : void
- doGET() : void
- doPOST() : void
- doPUT() : void
- 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
- listAll() : void
- returnResult() : void
- runResource() : void
- setError() : void
- setOk() : void
- buildThumbnails() : array<string|int, mixed>
- getWhereValues() : array<string|int, mixed>
- saveResource() : void
Constants
API_VERSION
public
mixed
API_VERSION
= 3
INCIDENT_EXPIRATION_TIME
public
mixed
INCIDENT_EXPIRATION_TIME
= 600
IP_LIST
public
mixed
IP_LIST
= 'api-ip-list'
MAX_INCIDENT_COUNT
public
mixed
MAX_INCIDENT_COUNT
= 5
Properties
$apiKey
protected
ApiKey
$apiKey
$model
protected
ProductoImagen
$model
$request
protected
Request
$request
$response
protected
Response
$response
$url
protected
string
$url
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.
doDELETE()
public
doDELETE() : void
doGET()
public
doGET() : void
doPOST()
public
doPOST() : void
doPUT()
public
doPUT() : void
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.
db()
protected
db() : DataBase
Return values
DataBasegetUriParam()
protected
getUriParam(string $num) : string
Parameters
- $num : string
Return values
stringlistAll()
protected
listAll() : void
returnResult()
protected
returnResult(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
runResource()
protected
runResource() : void
setError()
protected
setError(string $message[, array<string|int, mixed>|null $data = null ][, int $status = Response::HTTP_BAD_REQUEST ]) : void
Parameters
- $message : string
- $data : array<string|int, mixed>|null = null
- $status : int = Response::HTTP_BAD_REQUEST
setOk()
protected
setOk(string $message[, array<string|int, mixed>|null $data = null ]) : void
Parameters
- $message : string
- $data : array<string|int, mixed>|null = null
buildThumbnails()
private
buildThumbnails(ProductoImagen $item) : array<string|int, mixed>
Parameters
- $item : ProductoImagen
Return values
array<string|int, mixed>getWhereValues()
private
getWhereValues(mixed $filter, mixed $operation[, mixed $defaultOperation = 'AND' ]) : array<string|int, mixed>
Parameters
- $filter : mixed
- $operation : mixed
- $defaultOperation : mixed = 'AND'
Return values
array<string|int, mixed>saveResource()
private
saveResource() : void