Ler elemento do objeto
Estou realizando integração com a API dos correios/SIGEP , e tenho um metódo que me retorna o objeto abaixo, mas com dificuldades de ler o retorno, gostaria de uma ajuda por favor, já tentei da seguinte forma :
$result = $phpSigep->solicitaXmlPlp($idPlp);
echo $result->**numero_etiqueta** ;
abaixo o var_dump que executei na $result ;
PhpSigep\Services\Result Object ( [isSoapFault:protected] => [errorCode:protected] => [errorMsg:protected] => [result:protected] => PhpSigep\Model\SolicitaXmlPlpResult Object ( [tipo_arquivo:protected] => Postagem [versao_arquivo:protected] => 2.3 [plp:protected] => Array ( [id_plp] => 198905887 [valor_global] => 20.85 [mcu_unidade_postagem] => 235917 [nome_unidade_postagem] => AGF BERNARDO MONTEIRO [cartao_postagem] => 0071253637 ) [remetente:protected] => Array ( [numero_contrato] => 9912261781 [numero_diretoria] => 20 [codigo_administrativo] => 10267921 [nome_remetente] => F.A.P. ALEIXO EIRELI - ME [logradouro_remetente] => RUA AIMORES [numero_remetente] => 462 [complemento_remetente] => Array ( ) [bairro_remetente] => FUNCIONARIOS [cep_remetente] => 30140070 [cidade_remetente] => BELO HORIZONTE [uf_remetente] => MG [telefone_remetente] => Array ( ) [fax_remetente] => Array ( ) [email_remetente] => Array ( ) [celular_remetente] => Array ( ) ) [forma_pagamento:protected] => Array ( ) [objeto_postal:protected] => Array ( [**numero_etiqueta**] => PT622799751BR [codigo_objeto_cliente] => Array ( ) [codigo_servico_postagem] => 04669 [cubagem] => 0 [peso] => 200 [rt1] => Array ( ) [rt2] => Array ( ) [destinatario] => Array ( [nome_destinatario] => AMANDA DE OLIVEIRA BARROS CALVANO [telefone_destinatario] => Array ( ) [celular_destinatario] => Array ( ) [email_destinatario] => Array ( ) [logradouro_destinatario] => RUA BARÃO DE GUAPI [complemento_destinatario] => Array ( ) [numero_end_destinatario] => 244 ) [nacional] => Array ( [bairro_destinatario] => CENTRO [cidade_destinatario] => BARRA MANSA [uf_destinatario] => RJ [cep_destinatario] => 27345040 [codigo_usuario_postal] => Array ( ) [centro_custo_cliente] => Array ( ) [numero_nota_fiscal] => 15101 [serie_nota_fiscal] => Array ( ) [valor_nota_fiscal] => Array ( ) [natureza_nota_fiscal] => Array ( ) [descricao_objeto] => Array ( ) [valor_a_cobrar] => 0 ) [servico_adicional] => Array ( [valor_declarado] => 0 [codigo_servico_adicional] => 25 ) [dimensao_objeto] => Array ( [tipo_objeto] => 2 [dimensao_altura] => 9,00 [dimensao_largura] => 16,00 [dimensao_comprimento] => 21,00 [dimensao_diametro] => 0,00 ) [data_captacao] => 29/03/2019 18:41:59 [data_postagem_sara] => 20190329 [status_processamento] => 1 [numero_comprovante_postagem] => 1621266924 [valor_cobrado] => 20.85 ) [resultArray:protected] => Array ( [tipo_arquivo] => Postagem [versao_arquivo] => 2.3 [plp] => Array ( [id_plp] => 198905887 [valor_global] => 20.85 [mcu_unidade_postagem] => 235917 [nome_unidade_postagem] => AGF BERNARDO MONTEIRO [cartao_postagem] => 0071253637 ) [remetente] => Array ( [numero_contrato] => 9912261781 [numero_diretoria] => 20 [codigo_administrativo] => 10267921 [nome_remetente] => F.A.P. ALEIXO EIRELI - ME [logradouro_remetente] => RUA AIMORES [numero_remetente] => 462 [complemento_remetente] => Array ( ) [bairro_remetente] => FUNCIONARIOS [cep_remetente] => 30140070 [cidade_remetente] => BELO HORIZONTE [uf_remetente] => MG [telefone_remetente] => Array ( ) [fax_remetente] => Array ( ) [email_remetente] => Array ( ) [celular_remetente] => Array ( ) ) [forma_pagamento] => Array ( ) [objeto_postal] => Array ( [numero_etiqueta] => PT622799751BR [codigo_objeto_cliente] => Array ( ) [codigo_servico_postagem] => 04669 [cubagem] => 0 [peso] => 200 [rt1] => Array ( ) [rt2] => Array ( ) [destinatario] => Array ( [nome_destinatario] => AMANDA DE OLIVEIRA BARROS CALVANO [telefone_destinatario] => Array ( ) [celular_destinatario] => Array ( ) [email_destinatario] => Array ( ) [logradouro_destinatario] => RUA BARÃO DE GUAPI [complemento_destinatario] => Array ( ) [numero_end_destinatario] => 244 ) [nacional] => Array ( [bairro_destinatario] => CENTRO [cidade_destinatario] => BARRA MANSA [uf_destinatario] => RJ [cep_destinatario] => 27345040 [codigo_usuario_postal] => Array ( ) [centro_custo_cliente] => Array ( ) [numero_nota_fiscal] => 15101 [serie_nota_fiscal] => Array ( ) [valor_nota_fiscal] => Array ( ) [natureza_nota_fiscal] => Array ( ) [descricao_objeto] => Array ( ) [valor_a_cobrar] => 0 ) [servico_adicional] => Array ( [valor_declarado] => 0 [codigo_servico_adicional] => 25 ) [dimensao_objeto] => Array ( [tipo_objeto] => 2 [dimensao_altura] => 9,00 [dimensao_largura] => 16,00 [dimensao_comprimento] => 21,00 [dimensao_diametro] => 0,00 ) [data_captacao] => 29/03/2019 18:41:59 [data_postagem_sara] => 20190329 [status_processamento] => 1 [numero_comprovante_postagem] => 1621266924 [valor_cobrado] => 20.85 ) ) [_failIfAtributeNotExiste:protected] => ) [soapFault:protected] => [_failIfAtributeNotExiste:protected] => 1 )Discussão (2)
Carregando comentários...