@@ 104-134 (lines=31) @@ | ||
101 | * @param DOMDocument $dom |
|
102 | * @return array |
|
103 | */ |
|
104 | protected static function zReadRetRecepcao($dom) |
|
105 | { |
|
106 | //retorno da funçao |
|
107 | $aResposta = array( |
|
108 | 'bStat'=>false, |
|
109 | 'versao' => '', |
|
110 | 'tpAmb' => '', |
|
111 | 'verAplic' => '', |
|
112 | 'cStat' => '', |
|
113 | 'xMotivo' => '', |
|
114 | 'cUF' => '', |
|
115 | 'nRec' => '', |
|
116 | 'aProt' => array() |
|
117 | ); |
|
118 | $tag = $dom->getNode('retConsReciMDFe'); |
|
119 | if (empty($tag)) { |
|
120 | return $aResposta; |
|
121 | } |
|
122 | $aResposta = array( |
|
123 | 'bStat'=>true, |
|
124 | 'versao' => $tag->getAttribute('versao'), |
|
125 | 'tpAmb' => $dom->getValue($tag, 'tpAmb'), |
|
126 | 'verAplic' => $dom->getValue($tag, 'verAplic'), |
|
127 | 'cStat' => $dom->getValue($tag, 'cStat'), |
|
128 | 'xMotivo' => $dom->getValue($tag, 'xMotivo'), |
|
129 | 'nRec' => $dom->getValue($tag, 'nRec'), |
|
130 | 'cUF' => $dom->getValue($tag, 'tpAmb'), |
|
131 | 'aProt' => self::zGetProt($dom, $tag) |
|
132 | ); |
|
133 | return $aResposta; |
|
134 | } |
|
135 | ||
136 | /** |
|
137 | * zReadConsultaMDF |
|
@@ 227-257 (lines=31) @@ | ||
224 | * @param DOMDocument $dom |
|
225 | * @return string |
|
226 | */ |
|
227 | protected static function zReadRecepcaoEvento($dom) |
|
228 | { |
|
229 | //retorno da funçao |
|
230 | $aResposta = array( |
|
231 | 'bStat' => false, |
|
232 | 'versao' => '', |
|
233 | 'verAplic' => '', |
|
234 | 'tpAmb' => '', |
|
235 | 'id' => '', |
|
236 | 'cOrgao' => '', |
|
237 | 'cStat' => '', |
|
238 | 'xMotivo' => '', |
|
239 | 'aEvent' => array() |
|
240 | ); |
|
241 | $tag = $dom->getNode('retEvento'); |
|
242 | if (! isset($tag)) { |
|
243 | return $aResposta; |
|
244 | } |
|
245 | $aResposta = array( |
|
246 | 'bStat' => true, |
|
247 | 'versao' => $tag->getAttribute('versao'), |
|
248 | 'id' => $dom->getValue($tag, 'id'), |
|
249 | 'tpAmb' => $dom->getValue($tag, 'tpAmb'), |
|
250 | 'verAplic' => $dom->getValue($tag, 'verAplic'), |
|
251 | 'cOrgao' => $dom->getValue($tag, 'cOrgao'), |
|
252 | 'cStat' => $dom->getValue($tag, 'cStat'), |
|
253 | 'xMotivo' => $dom->getValue($tag, 'xMotivo'), |
|
254 | 'aEvent' => self::zGetEvent($dom, $tag) |
|
255 | ); |
|
256 | return $aResposta; |
|
257 | } |
|
258 | ||
259 | /** |
|
260 | * zReadConsNaoEnc |