get('/path/', function( Request $request) { $path = $request->get('path'); return $app->json( $app['phraseanet.core']['Serializer']->serialize( array( 'exists' => file_exists($path) , 'file' => is_file($path) , 'dir' => is_dir($path) , 'readable' => is_readable($path) , 'writeable' => is_writable($path) , 'executable' => is_executable($path) ) , 'json' ) ); }); $controllers->get('/url/', function( Request $request) { $url = $request->get('url'); return $app->json( $app['phraseanet.core']['Serializer']->serialize( array('code' => \http_query::getHttpCodeFromUrl($url)) , 'json' ) ); }); return $controllers; } }