1 | <?php |
||
22 | abstract class Service |
||
23 | { |
||
24 | /** |
||
25 | * Symfony's URL Generator |
||
26 | * @var UrlGeneratorInterface; |
||
27 | */ |
||
28 | private static $generator; |
||
29 | |||
30 | /** |
||
31 | * Symfony's Request class |
||
32 | * @var Request |
||
33 | */ |
||
34 | private static $request; |
||
35 | |||
36 | /** |
||
37 | * Symfony's FormFactory |
||
38 | * @var FormFactory |
||
39 | */ |
||
40 | private static $formFactory; |
||
41 | |||
42 | /** |
||
43 | * The kernel's environment (prod, debug, profile or test) |
||
44 | * @var string |
||
45 | */ |
||
46 | private static $environment; |
||
47 | |||
48 | /** |
||
49 | * The model memory cache |
||
50 | * @var ModelCache |
||
51 | */ |
||
52 | private static $modelCache; |
||
53 | |||
54 | /** |
||
55 | * The AppKernel's container |
||
56 | * @var AppKernel |
||
57 | */ |
||
58 | private static $kernel; |
||
59 | |||
60 | private static $qbConnection; |
||
61 | private static $qbConfig; |
||
62 | 23 | ||
63 | public static function setQueryBuilderConfig(array $config) |
||
67 | |||
68 | public static function getQueryBuilderConnection() |
||
76 | |||
77 | /** |
||
78 | 23 | * @param Request $request |
|
79 | */ |
||
80 | public static function setRequest($request) |
||
84 | |||
85 | /** |
||
86 | 1 | * @return Request |
|
87 | */ |
||
88 | 1 | public static function getRequest() |
|
98 | |||
99 | /** |
||
100 | * Sets the URL Generator. |
||
101 | * @param UrlGeneratorInterface $generator |
||
102 | * @return void |
||
103 | */ |
||
104 | public static function setGenerator($generator) |
||
108 | |||
109 | /** |
||
110 | * @return UrlGeneratorInterface |
||
111 | */ |
||
112 | public static function getGenerator() |
||
116 | |||
117 | /** |
||
118 | * Gets a parameter |
||
119 | * |
||
120 | * @param string $name The parameter name |
||
121 | * @return mixed The parameter value |
||
122 | */ |
||
123 | public static function getParameter($name) |
||
127 | |||
128 | /** |
||
129 | * @param SessionInterface $session |
||
130 | */ |
||
131 | public static function setSession($session) |
||
135 | |||
136 | /** |
||
137 | * @return SessionInterface |
||
138 | */ |
||
139 | public static function getSession() |
||
143 | 1 | ||
144 | /** |
||
145 | * Create a new session |
||
146 | * @return Session |
||
147 | */ |
||
148 | public static function getNewSession() |
||
155 | |||
156 | /** |
||
157 | 1 | * @return FormFactory |
|
158 | */ |
||
159 | 1 | public static function getFormFactory() |
|
163 | |||
164 | /** |
||
165 | 1 | * @param FormFactory $formFactory |
|
166 | */ |
||
167 | 1 | public static function setFormFactory($formFactory) |
|
171 | |||
172 | /** |
||
173 | 76 | * @return string |
|
174 | */ |
||
175 | 76 | public static function getEnvironment() |
|
179 | |||
180 | /** |
||
181 | 1 | * @param string $environment |
|
182 | */ |
||
183 | 1 | public static function setEnvironment($environment) |
|
187 | |||
188 | /** |
||
189 | 76 | * @return ModelCache |
|
190 | */ |
||
191 | 76 | public static function getModelCache() |
|
195 | |||
196 | /** |
||
197 | 1 | * @param ModelCache $modelCache |
|
198 | */ |
||
199 | 1 | public static function setModelCache($modelCache) |
|
203 | |||
204 | /** |
||
205 | 1 | * @return string[][] |
|
206 | */ |
||
207 | 1 | public static function getSiteThemes() |
|
211 | |||
212 | /** |
||
213 | 76 | * @return string |
|
214 | */ |
||
215 | 76 | public static function getDefaultSiteTheme() |
|
221 | |||
222 | /** |
||
223 | * @return ContainerInterface |
||
224 | */ |
||
225 | public static function getContainer() |
||
229 | |||
230 | /** |
||
231 | * @param $kernel |
||
232 | */ |
||
233 | public static function setKernel($kernel) |
||
237 | |||
238 | /** |
||
239 | * @return EventDispatcher |
||
240 | */ |
||
241 | public static function getDispatcher() |
||
245 | |||
246 | /** |
||
247 | * @return bool |
||
248 | */ |
||
249 | public static function isDebug() |
||
253 | } |
||
254 |