Controle
in package
Contrôleur : reçoit et traite les demandes du point d'entrée
Table of Contents
- $accessBDD : mixed
- __construct() : mixed
- Constructeur : récupération de l'instance d'accès à la BDD
- delete() : mixed
- requete arrivée en DELETE
- get() : mixed
- requete arrivée en GET (select)
- post() : mixed
- requete arrivée en POST (insert)
- put() : mixed
- requete arrivée en PUT (update)
- unauthorized() : mixed
- login et/ou pwd incorrects
- reponse() : mixed
- réponse renvoyée (affichée) au client au format json
Properties
$accessBDD
private
mixed
$accessBDD
Methods
__construct()
Constructeur : récupération de l'instance d'accès à la BDD
public
__construct() : mixed
Return values
mixed —delete()
requete arrivée en DELETE
public
delete(string $table, array<string|int, mixed> $champs) : mixed
Parameters
- $table : string
-
nom de la table
- $champs : array<string|int, mixed>
-
nom et valeur des champs
Return values
mixed —get()
requete arrivée en GET (select)
public
get(string $table, type $champs) : mixed
Parameters
- $table : string
-
nom de la table
- $champs : type
-
nom et valeur des champs de recherche
Return values
mixed —post()
requete arrivée en POST (insert)
public
post(string $table, array<string|int, mixed> $champs) : mixed
Parameters
- $table : string
-
nom de la table
- $champs : array<string|int, mixed>
-
nom et valeur des champs
Return values
mixed —put()
requete arrivée en PUT (update)
public
put(string $table, string $id, array<string|int, mixed> $champs) : mixed
Parameters
- $table : string
-
nom de la table
- $id : string
-
valeur de l'id
- $champs : array<string|int, mixed>
-
nom et valeur des champs
Return values
mixed —unauthorized()
login et/ou pwd incorrects
public
unauthorized() : mixed
Return values
mixed —reponse()
réponse renvoyée (affichée) au client au format json
private
reponse(int $code, string $message[, array<string|int, mixed> $result = "" ]) : mixed
Parameters
- $code : int
-
code standard HTTP
- $message : string
-
message correspondant au code
- $result : array<string|int, mixed> = ""
-
résultat de la demande