-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconditional_request_matching.yaml
52 lines (52 loc) · 2.41 KB
/
conditional_request_matching.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
questions:
-
uuid: 1eebf878-8ba4-668a-ba5b-99d84c92580c
question: 'What are the available variable given by symfony to conditionnate a route matching ?'
answers:
- { value: request, correct: true }
- { value: context, correct: true }
- { value: session, correct: false }
- { value: params, correct: true }
- { value: 'all of them', correct: false }
- { value: 'none of them', correct: false }
help: 'https://symfony.com/doc/current/routing.html#matching-expressions'
-
uuid: 1eebf878-8ba8-6438-9c57-99d84c92580c
question: 'What are the accessible variables you can call to restrict a route ?'
answers:
- { value: context, correct: true }
- { value: request, correct: true }
- { value: content-type, correct: false }
- { value: params, correct: true }
- { value: 'env(string $name)', correct: true }
- { value: 'service(string $alias)', correct: true }
- { value: user-agent, correct: false }
- { value: device, correct: false }
help: 'https://symfony.com/doc/current/routing.html#matching-expressions'
-
uuid: 1eebf878-8ba8-6488-b768-99d84c92580c
question: 'Is it possible for a route parameter in Symfony to include a / character?'
answers:
- { value: "Yes by setting a permissive way #[Route('/{token}', requirements: ['token' => '.+'])]", correct: true }
- { value: 'No', correct: false }
- { value: 'Yes in all way', correct: false }
help: 'https://symfony.com/doc/6.4/routing.html#slash-characters-in-route-parameters'
-
uuid: 1eebf878-8ba8-64ce-bd3b-99d84c92580c
question: "Is it possible to have multiple parameter in the same path like ?#[Route('/share/{token}/{token}')]"
answers:
- { value: 'Yes', correct: false }
- { value: 'No', correct: true }
help: 'https://symfony.com/doc/6.4/routing.html'
-
uuid: 1ef91f04-dcbb-64dc-9928-7b259c35a967
question: "Which variables can be utilized in the ExpressionLanguage expression when using the condition option on a Route?"
answers:
- { value: 'context', correct: true }
- { value: 'request', correct: true }
- { value: 'container', correct: false }
- { value: 'service', correct: false }
- { value: 'this', correct: false }
- { value: 'user', correct: false }
- { value: 'object', correct: false }
help: 'https://symfony.com/doc/current/routing.html#matching-expressions'