0

我通过 PUT 方法和 JSON 格式发送参数(interseccion、calle、numero)。我想在 php (Symfony2) 中接收,$this->request->request但是当我执行 var_dump 时没有参数。但是,参数只是在"content": protected.标签中

我正在发送$this->request$this->request->request

在此处输入图像描述

在这种情况下,我如何从"content": protected.标签中检索参数(interseccion、calle、numero)?

object(Symfony\Component\HttpFoundation\Request)#6 (20) { ["attributes"]=> object(Symfony\Component\HttpFoundation\ParameterBag)#9 (1) { ["parameters":protected]=> array( 8) { ["_controller"]=> 字符串(60) "MiCiudad\MgpBundle\Controller\MgpController::solicitudAction" ["_route"]=> 字符串(26) "miciudad_mgp_mgp_solicitud" ["_route_params"]=> 数组(0 ) { } ["_template"]=> string(15) "index.html.twig" ["_method"]=> object(Sensio\Bundle\FrameworkExtraBundle\Configuration\Method)#412 (1) { ["methods" :protected]=> array(1) { [0]=> string(3) "PUT" } } ["_template_vars"]=> array(0) { } ["_template_streamable"]=> bool(false) [" _template_default_vars" ]=> array(0) { } } } ["request"]=> object(Symfony\Component\HttpFoundation\ParameterBag)#7 (1) { ["parameters":protected]=> array(0) { } }["query"]=> object(Symfony\Component\HttpFoundation\ParameterBag)#8 (1) { ["parameters":protected]=> array(2) { ["apiKey"]=> string(8) "MiCiudad " ["hash"]=> string(32) "e8e9beb0f0a2dd4800929566d13d2ce2" } } ["server"]=> object(Symfony\Component\HttpFoundation\ServerBag)#12 (1) { ["parameters":protected]=> 数组(44) { ["MIBDIRS"]=> 字符串(24) "C:/xampp/php/extras/mibs" ["MYSQL_HOME"]=> 字符串(16) "\xampp\mysql\bin" ["OPENSSL_CONF" ]=> 字符串(31) "C:/xampp/apache/bin/openssl.cnf" ["PHP_PEAR_SYSCONF_DIR"]=> 字符串(10) "\xampp\php" ["PHPRC"]=> 字符串(10) " \xampp\php" ["TMP"]=> 字符串(10) "\xampp\tmp"["HTTP_HOST"]=> string(14) "miciudad.local" ["HTTP_CONNECTION"]=> string(10) "keep-alive" ["CONTENT_LENGTH"]=> string(4) "1238" ["HTTP_ORIGIN" ]=> string(51) "chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo" ["HTTP_USER_AGENT"]=> string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0 .1547.76 Safari/537.36" ["CONTENT_TYPE"]=> 字符串(16) "应用程序/json" ["HTTP_ACCEPT"]=> 字符串(3) "chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo" ["HTTP_USER_AGENT"]=> string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36" [" CONTENT_TYPE"]=> 字符串(16) "应用程序/json" ["HTTP_ACCEPT"]=> 字符串(3) "chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo" ["HTTP_USER_AGENT"]=> string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36" [" CONTENT_TYPE"]=> 字符串(16) "应用程序/json" ["HTTP_ACCEPT"]=> 字符串(3) "/" ["HTTP_ACCEPT_ENCODING"]=> 字符串(17) "gzip,deflate,sdch" ["HTTP_ACCEPT_LANGUAGE"]=> 字符串(15) "es-419,es;q=0.8" ["PATH"]=> 字符串( 397) "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;%SSTEMROOT%\System32\WindowsPowerShell\v1.0\C:\Program Files\Java\jdk1.7.0_03\bin ;C:\xampp\php\;C:\Program Files (x86)\Git\bin;C:\ProgramData\Composer\bin;;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program文件 (x86)\QuickTime\QTSystem\;C:\Program Files\SlikSvn\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;" ["SystemRoot"]= > 字符串(10) "C:\Windows" ["COMSPEC"]=> 字符串(27) "C:\Windows\system32\cmd.exe" ["PATHEXT"]=> 字符串(53) ".COM;. EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" ["WINDIR"]=> 字符串(10) "C:\Windows" ["SERVER_SIGNATURE"]=> 字符串(98) " Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 服务器位于 miciudad.local 端口 80 " ["SERVER_SOFTWARE"]=> string(45) "Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7" ["SERVER_NAME"]= > string(14) "miciudad.local" ["SERVER_ADDR"]=> string(9) "127.0.0.1" ["SERVER_PORT"]=> string(2) "80" ["REMOTE_ADDR"]=> string(9 ) "127.0.0.1" ["DOCUMENT_ROOT"]=> 字符串(32) "C:/xampp/htdocs/miCiudad-Web/web" ["REQUEST_SCHEME"]=> 字符串(4) "http" ["CONTEXT_PREFIX"] => 字符串(0) "" ["CONTEXT_DOCUMENT_ROOT"]=>字符串(32)“C:/xampp/htdocs/miCiudad-Web/web”[“SERVER_ADMIN”]=>字符串(19)“admin@localhost.com”[“SCRIPT_FILENAME”]=>字符串(44)“C: /xampp/htdocs/miCiudad-Web/web/app_dev.php" ["REMOTE_PORT"]=> 字符串(5) "50953" ["GATEWAY_INTERFACE"]=> 字符串(7) "CGI/1.1" ["SERVER_PROTOCOL"] => 字符串(8) "HTTP/1.1" ["REQUEST_METHOD"]=> 字符串(3) "PUT" ["QUERY_STRING"]=> 字符串(53) "apiKey=MiCiudad&hash=e8e9beb0f0a2dd4800929566d13d2ce2" ["REQUEST_URI"]=>字符串(80)“/app_dev.php/mgp/solicitud?apiKey=MiCiudad&hash=e8e9beb0f0a2dd4800929566d13d2ce2”[“SCRIPT_NAME”]=>字符串(12)“/app_dev.php”[“PATH_INFO”]=>字符串(14)“/mgp/solicitud”[“PATH_TRANSLATED”]=>字符串(27)“重定向:\app.php\solicitud”[“PHP_SELF”]=>字符串(26)“/app_dev.php/mgp/ solicitud" ["REQUEST_TIME_FLOAT"]=> float(1380716540.164) ["REQUEST_TIME"]=> int(1380716540) } } ["files"]=> object(Symfony\Component\HttpFoundation\FileBag)#11 (1) { [ "参数":protected]=> 数组(0) { } } ["cookies"]=> 对象(Symfony\Component\HttpFoundation\ParameterBag)#10 (1) { ["parameters":protected]=> 数组(0 ) { } } ["headers"]=> object(Symfony\Component\HttpFoundation\HeaderBag)#13 (2) { ["headers":protected]=> array(10) { ["host"]=> array( 1) { [0]=> 字符串(14) "miciudad.local" } ["连接"]=> 数组(1) { [0]=> 字符串(10) "保持活动" } ["内容长度"]=> 数组(1) { [0]=> 字符串(4) "1238 " } ["origin"]=> array(1) { [0]=> string(51) "chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo" } ["user-agent"]=> array(1) { [0] => string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36" } ["content-type"]=> array(1) { [0]=>字符串(16)“应用程序/json”}[“接受”]=>数组(1){[0]=>字符串(3)“chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo" } ["user-agent"]=> array(1) { [0]=> string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36" } ["content-type"]=> array(1) { [0]=> string(16) "application/json" } ["accept"]=> array( 1) { [0]=> 字符串(3) "chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo" } ["user-agent"]=> array(1) { [0]=> string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36" } ["content-type"]=> array(1) { [0]=> string(16) "application/json" } ["accept"]=> array( 1) { [0]=> 字符串(3) "/ " } ["accept-encoding"]=> array(1) { [0]=> string(17) "gzip,deflate,sdch" } ["accept-language"]=> array(1) { [0 ]=> 字符串(15) "es-419,es;q=0.8" } ["x-php-ob-level"]=> 数组(1) { [0]=> int(1) } } [" cacheControl":protected]=> 数组(0) { } }["content":protected]=> string(1238) "{"interseccion"="LA RIOJA","calleCorregida":"LA RIOJA","numeroCorregido":"3800","direccionValidada":1,"tipoSolicitudId" :"8","datos_extendidos":{},"idioma":"es","descripcion":"","datos_personales":{"telefono":"0201AB1FAFC5E521C3AD003D7BBBE809D13EFBB5936BF2F11B471160699ADA15FF34B0CBD8D6281E5CC04D8DF9270E21EA831D571EF4C198FA6FC85D50E7D75FE2CC8E6F00FDFBFE58A594369C33BBB5261C","apellido":"020129C5BEA971F8980B95F4058485EDEC79C3DC5D2393DBBB5D18857EF1685363839B81B5F5B0BADFCCD2E31E254F9270FC5DE7D81917FABD985222014DFA87FE495E23A3964B215976749B4811C9464EB1","nombre “:”0201BFF9E505FCF6DD4E0697EE1B888D4862740A6AFBFEDF0AC0ED98E733245EE8B926EF2FEBCD7D0DD94818FDDDE7C13347BED4E5ED93D5D6DFF98A18D93A2C77808B2CE58EB8CE8FB45651B9CE77E2F89B","email":"020163DCA47AF4EF8A3A654BBBE80C9678A8757B908CCECBBCFEE1445977B21A534391F7B392BA14B7FCC026FFFB384A14DAB65FB6E09B14183B8E9D379666D9964B01C42BC2E10425007DD8C7209EF34CB2E5873082522BDCDED2955B800BCCB2E3","dni":"0201635402DDF67E1EBCAE620B2EE713719B687904BA111462FA998424E78BA310C0D8ED04071118215B47B25BA1D9C730398C16F62BB888C7F26591BC3D2E518D24CF325F41CD0386D9B172241DC4500CDD"},"calleId":"00691","latitud":"-38.0149720701376","dispositivoId":"476","longitud":" -57.565044058572","foto":"","calle":"FORMOSA"}" [“语言”:受保护]=>数组(2){[0]=>字符串(6)“es_419” 1=> string(2) "es" } ["charsets":protected]=> NULL ["acceptableContentTypes":protected]=> NULL ["pathInfo":protected]=> string(14) "/mgp/solicitud" [ "requestUri":protected]=> 字符串(80) "/app_dev.php/mgp/solicitud?apiKey=MiCiudad&hash=e8e9beb0f0a2dd4800929566d13d2ce2" ["baseUrl":protected]=> 字符串(12) "/app_dev.php" ["basePath ":protected]=> NULL ["method":protected]=> string(3) "PUT" ["format":protected]=> string(4) "html" ["session":protected]=> object( Symfony\Component\HttpFoundation\Session\Session)#99 (3) { ["storage":protected]=> object(Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage)#98 (5) { ["bag":protected]=> array(2) { ["attributes"]=> object(Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag)#94 (3) { ["name":"Symfony\Component\HttpFoundation \Session\Attribute\AttributeBag":private]=> string(10) "attributes" ["storageKey":"Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag":private]=> string(15) "_sf2_attributes" [ "attributes":protected]=> array(0) { } } ["flashes"]=> object(Symfony\Component\HttpFoundation\Session\Flash\FlashBag)#93 (3) { ["name":"Symfony\ Component\HttpFoundation\Session\Flash\FlashBag":private]=> 字符串(7) "flashes" ["flashes":"Symfony\Component\HttpFoundation\Session\Flash\FlashBag":private]=>array(0) { } ["storageKey":"Symfony\Component\HttpFoundation\Session\Flash\FlashBag":private]=> string(12) "_sf2_flashes" } } ["started":protected]=> bool(false ) ["close":protected]=> bool(false) ["saveHandler":protected]=> object(Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy)#95 (4) { ["handler": protected]=> object(Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler)#97 (0) { } ["wrapper":protected]=> bool(true) ["active":protected]=> bool (false) ["saveHandlerName":protected]=> string(5) "files" } ["metadataBag":protected]=> object(Symfony\Component\HttpFoundation\Session\Storage\MetadataBag)#96 (4) { [ "name":"Symfony\Component\HttpFoundation\Session\Storage\MetadataBag":private]=> 字符串(10) "__metadata" ["storageKey":"Symfony\Component\HttpFoundation\Session\Storage\MetadataBag":private]= > string(9) "_sf2_meta" ["meta":protected]=> 数组(3) { ["c"]=> int(0) ["u"]=> int(0) ["l"]= > int(0) } ["lastUsed":"Symfony\Component\HttpFoundation\Session\Storage\MetadataBag":private]=> NULL } } ["flashName":"Symfony\Component\HttpFoundation\Session\Session":private ]=> string(7) "闪烁" ["attributeName":"Symfony\Component\HttpFoundation\Session\Session":private]=> string(10) "attributes" } ["locale":protected]=>字符串(6) "es_419" ["defaultLocale":protected]=> 字符串(2) "es" }

$this->request->request

对象(Symfony\Component\HttpFoundation\ParameterBag)#7 (1) { ["parameters":protected]=> array(0) { } }

4

0 回答 0