0
I’m using a API by Sigep that I found on github, did some tests and worked, the problem is that I would like to return the results in JSON or XML, and the return of the class is coming with the visibility of its properties, I’ve noticed this in other libraries/Ibraries, this is some kind of pattern?
The example used was the "calcPrecoPrazo", inside the examples/calcPrecoPrazo.php folder
example of return:
Array
(
[*isSoapFault] =>
[*errorCode] =>
[*errorMsg] =>
[*result] => Array
(
[0] => PhpSigep\Model\CalcPrecoPrazoResposta Object
(
[servico:protected] => PhpSigep\Model\ServicoDePostagem Object
(
[codigo:protected] => 41068
[idServico:protected] => 109819
[nome:protected] => Pac 41068
[_failIfAtributeNotExiste:protected] => 1
)
[valor:protected] => 15.79
[prazoEntrega:protected] => 5
[valorMaoPropria:protected] => 0
[valorAvisoRecebimento:protected] => 0
[valorValorDeclarado:protected] => 0
[entregaDomiciliar:protected] => 1
[entregaSabado:protected] =>
[erroCodigo:protected] => 0
[erroMsg:protected] =>
[_failIfAtributeNotExiste:protected] => 1
)