1 | <?php |
||
2 | /******************************************************************************* |
||
3 | * This file is part of the GraphQL Bundle package. |
||
4 | * |
||
5 | * (c) YnloUltratech <[email protected]> |
||
6 | * |
||
7 | * For the full copyright and license information, please view the LICENSE |
||
8 | * file that was distributed with this source code. |
||
9 | ******************************************************************************/ |
||
10 | |||
11 | namespace Ynlo\GraphQLBundle\Events; |
||
12 | |||
13 | use Symfony\Component\EventDispatcher\Event; |
||
14 | use Ynlo\GraphQLBundle\Resolver\ResolverContext; |
||
15 | |||
16 | class GraphQLFieldEvent extends Event |
||
0 ignored issues
–
show
Deprecated Code
introduced
by
![]() |
|||
17 | { |
||
18 | /** |
||
19 | * @var ResolverContext |
||
20 | */ |
||
21 | protected $context; |
||
22 | |||
23 | /** |
||
24 | * @var mixed|null |
||
25 | */ |
||
26 | protected $value; |
||
27 | |||
28 | /** |
||
29 | * GraphQLFieldEvent constructor. |
||
30 | * |
||
31 | * @param ResolverContext $context |
||
32 | * @param mixed|null $value |
||
33 | */ |
||
34 | 2 | public function __construct(ResolverContext $context, $value = null) |
|
35 | { |
||
36 | 2 | $this->context = $context; |
|
37 | 2 | $this->value = $value; |
|
38 | 2 | } |
|
39 | |||
40 | /** |
||
41 | * @return ResolverContext |
||
42 | */ |
||
43 | 2 | public function getContext(): ResolverContext |
|
44 | { |
||
45 | 2 | return $this->context; |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return mixed|null |
||
50 | */ |
||
51 | public function getValue() |
||
52 | { |
||
53 | return $this->value; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @param mixed $value |
||
58 | */ |
||
59 | public function setValue($value): void |
||
60 | { |
||
61 | $this->value = $value; |
||
62 | } |
||
63 | } |
||
64 |