HttpFoundation Flashcards

1
Q

recuperer l’URI demandé par le client

A

$request->getPathInfo();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

obtenir les variables GET

A

$request->query->get(‘foo’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

obtenir les variables POST

A

$request->request->get(‘bar’, ‘valeur par défaut si bar est inexistant’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

obtenir les variables SERVER

A

$request->server->get(‘HTTP_HOST’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

obtenir une instance de UploadedFile identifiée par foo

A

$request->files->get(‘foo’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

obtenir la valeur d’un COOKIE

A

$request->cookies->get(‘PHPSESSID’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

obtenir un entête de requête HTTP request header, normalisé en minuscules

A

$request->headers->get(‘host’);

$request->headers->get(‘content_type’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

obtenir la methode HTTP utiliser par le client

A

$request->getMethod();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

obtenir le tableau des langues que le client accepte

A

$request->getLanguages();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly