HTTP foundation Flashcards

1
Q

What interface represents a session object?

A

Symfony\Component\HttpFoundation\Session\SessionInterface

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

How do you check the contents of the flashbag without removing it?

A

By using peek(string $type, array $default = []) method.

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

What is the type of the object that is used to store response headers?

A

Symfony\Component\HttpFoundation\ResponseHeaderBag

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

What are possible objects to represent a response?

A

Symfony\Component\HttpFoundation\Response
Symfony\Component\HttpFoundation\RedirectResponse
Symfony\Component\HttpFoundation\JsonResponse
Symfony\Component\HttpFoundation\StreamedResponse
Symfony\Component\HttpFoundation\BinaryFileResponse

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

What are available argument value resolvers?

A

Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver
Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver
Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver
Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver
Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver
Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver
Symfony\Component\Security\Http\Controller\UserValueResolver
Sensio\Bundle\FrameworkExtraBundle\Request\ArgumentValueResolver\Psr7ServerRequestResolver

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

What type of object represents uploaded file?

A

Symfony\Component\HttpFoundation\File\UploadedFile

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

What request object property represents the $_POST data?

A

request

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

What request object property represents the $_GET data?

A

query

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

What types of objects are used as bags by the request property?

A

Symfony\Component\HttpFoundation\ParameterBag
Symfony\Component\HttpFoundation\InputBag
Symfony\Component\HttpFoundation\FileBag
Symfony\Component\HttpFoundation\ServerBag
Symfony\Component\HttpFoundation\HeaderBag

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

Where from is Request::$languages data taken?

A

Accept-Language header

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

Where from is Request::$charsets data taken?

A

Accept-Charset header

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

Where from is Request::$encodings data taken?

A

Accept-Encoding header

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

Where from is Request::$acceptableContentTypes data taken?

A

Accept header

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

What are possible session operations?

A
open
read
write
close
gc
close
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are standard session handlers?

A

Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler
Symfony\Component\HttpFoundation\Session\Storage\Handler\MigratingSessionHandler
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler
Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler
Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler

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

What session storage engine should be used when writing Unit tests?

A

Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage

17
Q

What session storage engine should be used when writing Functional tests?

A

Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage

18
Q

What methods are defined by Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface?

A
has(string $name);
get(string $name, $default = null);
set(string $name, $value);
all();
replace(array $attributes);
remove(string $name);
19
Q

What are the methods defined by Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface?

A
add()
set()
get()
setAll()
all()
peek()
peekAll()
has()
keys()
clear()