I'm using a Sigep API that I found in github, I did some testing and it 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 noticed this in other libraries / libraries, is this some kind of pattern?
The example used was "calcPrecoPrazo" , within the examples folder / calcPrecoPrazo.php
return example:
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
)