Normalize request calls

This commit is contained in:
Romain Neutron
2012-08-23 11:46:20 +02:00
parent 299e920adc
commit 0f7056dfed
31 changed files with 341 additions and 341 deletions

View File

@@ -30,18 +30,18 @@ class PathFileTest implements ControllerProviderInterface
$controllers->get('/path/', function(Application $app, Request $request) {
return $app->json(array(
'exists' => file_exists($request->get('path'))
, 'file' => is_file($request->get('path'))
, 'dir' => is_dir($request->get('path'))
, 'readable' => is_readable($request->get('path'))
, 'writeable' => is_writable($request->get('path'))
, 'executable' => is_executable($request->get('path'))
'exists' => file_exists($request->query->get('path'))
, 'file' => is_file($request->query->get('path'))
, 'dir' => is_dir($request->query->get('path'))
, 'readable' => is_readable($request->query->get('path'))
, 'writeable' => is_writable($request->query->get('path'))
, 'executable' => is_executable($request->query->get('path'))
));
});
$controllers->get('/url/', function(Application $app, Request $request) {
return $app->json(array('code' => \http_query::getHttpCodeFromUrl($request->get('url'))));
return $app->json(array('code' => \http_query::getHttpCodeFromUrl($request->query->get('url'))));
});
return $controllers;