@@ -99,20 +99,16 @@ public function panelAction(Request $request, $token)
99
99
throw new NotFoundHttpException (sprintf ('Panel "%s" is not available for token "%s". ' , $ panel , $ token ));
100
100
}
101
101
102
- return Response::create (
103
- $ this ->twig ->render ($ this ->getTemplateManager ()->getName ($ profile , $ panel ), array (
104
- 'token ' => $ token ,
105
- 'profile ' => $ profile ,
106
- 'collector ' => $ profile ->getCollector ($ panel ),
107
- 'panel ' => $ panel ,
108
- 'page ' => $ page ,
109
- 'request ' => $ request ,
110
- 'templates ' => $ this ->getTemplateManager ()->getTemplates ($ profile ),
111
- 'is_ajax ' => $ request ->isXmlHttpRequest (),
112
- )),
113
- 200 ,
114
- array ('Content-Type ' => 'text/html ' )
115
- )->setCharset ('UTF-8 ' );
102
+ return new Response ($ this ->twig ->render ($ this ->getTemplateManager ()->getName ($ profile , $ panel ), array (
103
+ 'token ' => $ token ,
104
+ 'profile ' => $ profile ,
105
+ 'collector ' => $ profile ->getCollector ($ panel ),
106
+ 'panel ' => $ panel ,
107
+ 'page ' => $ page ,
108
+ 'request ' => $ request ,
109
+ 'templates ' => $ this ->getTemplateManager ()->getTemplates ($ profile ),
110
+ 'is_ajax ' => $ request ->isXmlHttpRequest (),
111
+ )), 200 , array ('Content-Type ' => 'text/html ' ));
116
112
}
117
113
118
114
/**
@@ -151,13 +147,9 @@ public function infoAction($about)
151
147
152
148
$ this ->profiler ->disable ();
153
149
154
- return Response::create (
155
- $ this ->twig ->render ('@WebProfiler/Profiler/info.html.twig ' , array (
156
- 'about ' => $ about ,
157
- )),
158
- 200 ,
159
- array ('Content-Type ' => 'text/html ' )
160
- )->setCharset ('UTF-8 ' );
150
+ return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/info.html.twig ' , array (
151
+ 'about ' => $ about ,
152
+ )), 200 , array ('Content-Type ' => 'text/html ' ));
161
153
}
162
154
163
155
/**
@@ -205,17 +197,13 @@ public function toolbarAction(Request $request, $token)
205
197
// the profiler is not enabled
206
198
}
207
199
208
- return Response::create (
209
- $ this ->twig ->render ('@WebProfiler/Profiler/toolbar.html.twig ' , array (
210
- 'position ' => $ position ,
211
- 'profile ' => $ profile ,
212
- 'templates ' => $ this ->getTemplateManager ()->getTemplates ($ profile ),
213
- 'profiler_url ' => $ url ,
214
- 'token ' => $ token ,
215
- )),
216
- 200 ,
217
- array ('Content-Type ' => 'text/html ' )
218
- )->setCharset ('UTF-8 ' );
200
+ return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/toolbar.html.twig ' , array (
201
+ 'position ' => $ position ,
202
+ 'profile ' => $ profile ,
203
+ 'templates ' => $ this ->getTemplateManager ()->getTemplates ($ profile ),
204
+ 'profiler_url ' => $ url ,
205
+ 'token ' => $ token ,
206
+ )), 200 , array ('Content-Type ' => 'text/html ' ));
219
207
}
220
208
221
209
/**
@@ -253,19 +241,15 @@ public function searchBarAction(Request $request)
253
241
$ token = $ session ->get ('_profiler_search_token ' );
254
242
}
255
243
256
- return Response::create (
257
- $ this ->twig ->render ('@WebProfiler/Profiler/search.html.twig ' , array (
258
- 'token ' => $ token ,
259
- 'ip ' => $ ip ,
260
- 'method ' => $ method ,
261
- 'url ' => $ url ,
262
- 'start ' => $ start ,
263
- 'end ' => $ end ,
264
- 'limit ' => $ limit ,
265
- )),
266
- 200 ,
267
- array ('Content-Type ' => 'text/html ' )
268
- )->setCharset ('UTF-8 ' );
244
+ return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/search.html.twig ' , array (
245
+ 'token ' => $ token ,
246
+ 'ip ' => $ ip ,
247
+ 'method ' => $ method ,
248
+ 'url ' => $ url ,
249
+ 'start ' => $ start ,
250
+ 'end ' => $ end ,
251
+ 'limit ' => $ limit ,
252
+ )), 200 , array ('Content-Type ' => 'text/html ' ));
269
253
}
270
254
271
255
/**
@@ -295,22 +279,18 @@ public function searchResultsAction(Request $request, $token)
295
279
$ end = $ request ->query ->get ('end ' , null );
296
280
$ limit = $ request ->query ->get ('limit ' );
297
281
298
- return Response::create (
299
- $ this ->twig ->render ('@WebProfiler/Profiler/results.html.twig ' , array (
300
- 'token ' => $ token ,
301
- 'profile ' => $ profile ,
302
- 'tokens ' => $ this ->profiler ->find ($ ip , $ url , $ limit , $ method , $ start , $ end ),
303
- 'ip ' => $ ip ,
304
- 'method ' => $ method ,
305
- 'url ' => $ url ,
306
- 'start ' => $ start ,
307
- 'end ' => $ end ,
308
- 'limit ' => $ limit ,
309
- 'panel ' => null ,
310
- )),
311
- 200 ,
312
- array ('Content-Type ' => 'text/html ' )
313
- )->setCharset ('UTF-8 ' );
282
+ return new Response ($ this ->twig ->render ('@WebProfiler/Profiler/results.html.twig ' , array (
283
+ 'token ' => $ token ,
284
+ 'profile ' => $ profile ,
285
+ 'tokens ' => $ this ->profiler ->find ($ ip , $ url , $ limit , $ method , $ start , $ end ),
286
+ 'ip ' => $ ip ,
287
+ 'method ' => $ method ,
288
+ 'url ' => $ url ,
289
+ 'start ' => $ start ,
290
+ 'end ' => $ end ,
291
+ 'limit ' => $ limit ,
292
+ 'panel ' => null ,
293
+ )), 200 , array ('Content-Type ' => 'text/html ' ));
314
294
}
315
295
316
296
/**
@@ -384,7 +364,7 @@ public function phpinfoAction()
384
364
phpinfo ();
385
365
$ phpinfo = ob_get_clean ();
386
366
387
- return Response:: create ($ phpinfo , 200 , array ('Content-Type ' => 'text/html ' ))-> setCharset ( ' UTF-8 ' );
367
+ return new Response ($ phpinfo , 200 , array ('Content-Type ' => 'text/html ' ));
388
368
}
389
369
390
370
/**
0 commit comments