46
46
*/
47
47
trait ControllerTrait
48
48
{
49
+ /**
50
+ * @required
51
+ */
49
52
protected function getRouter (): RouterInterface
50
53
{
51
54
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , RouterInterface::class));
52
55
}
53
56
57
+ /**
58
+ * @required
59
+ */
54
60
protected function getRequestStack (): RequestStack
55
61
{
56
62
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , RequestStack::class));
57
63
}
58
64
65
+ /**
66
+ * @required
67
+ */
59
68
protected function getHttpKernel (): HttpKernelInterface
60
69
{
61
70
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , HttpKernelInterface::class));
62
71
}
63
72
73
+ /**
74
+ * @required
75
+ */
64
76
protected function getSerializer (): SerializerInterface
65
77
{
66
78
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , SerializerInterface::class));
@@ -70,38 +82,56 @@ protected function getSerializer(): SerializerInterface
70
82
* An instance of the Session implementation (and not the interface) is returned because getFlashBag is not part of
71
83
* the interface.
72
84
*
73
- * @return Session
85
+ * @required
74
86
*/
75
87
protected function getSession (): Session
76
88
{
77
89
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , Session::class));
78
90
}
79
91
92
+ /**
93
+ * @required
94
+ */
80
95
protected function getAuthorizationChecker (): AuthorizationCheckerInterface
81
96
{
82
97
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , AuthorizationCheckerInterface::class));
83
98
}
84
99
100
+ /**
101
+ * @required
102
+ */
85
103
protected function getTwig (): \Twig_Environment
86
104
{
87
105
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , \Twig_Environment::class));
88
106
}
89
107
108
+ /**
109
+ * @required
110
+ */
90
111
protected function getDoctrine (): ManagerRegistry
91
112
{
92
113
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , ManagerRegistry::class));
93
114
}
94
115
116
+ /**
117
+ * @required
118
+ */
95
119
protected function getFormFactory (): FormFactoryInterface
96
120
{
97
121
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , FormFactoryInterface::class));
98
122
}
99
123
124
+ /**
125
+ * @required
126
+ */
100
127
protected function getTokenStorage (): TokenStorageInterface
101
128
{
102
129
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , TokenStorageInterface::class));
103
130
}
104
131
132
+ /**
133
+ * @required
134
+ */
105
135
protected function getCsrfTokenManager (): CsrfTokenManagerInterface
106
136
{
107
137
throw new \LogicException (sprintf ('An instance of "%s" must be provided. ' , CsrfTokenManagerInterface::class));
0 commit comments