| @@ 71-80 (lines=10) @@ | ||
| 68 | //General error level in the transmissionError location: |
|
| 69 | $errorCodeNodeList = $domXpath->query(self::Q_G_ERR); |
|
| 70 | ||
| 71 | if ($errorCodeNodeList->length > 0) { |
|
| 72 | $errorCatNode = $domXpath->query(self::Q_G_CAT)->item(0); |
|
| 73 | $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode)); |
|
| 74 | ||
| 75 | $code = $errorCodeNodeList->item(0)->nodeValue; |
|
| 76 | $errorTextNodeList = $domXpath->query(self::Q_G_MSG); |
|
| 77 | $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList); |
|
| 78 | ||
| 79 | $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'general'); |
|
| 80 | } |
|
| 81 | ||
| 82 | //FP level errors via the fopDescription/fpElementError data: |
|
| 83 | $errorCodeNodeList = $domXpath->query(self::Q_F_ERR); |
|
| @@ 85-94 (lines=10) @@ | ||
| 82 | //FP level errors via the fopDescription/fpElementError data: |
|
| 83 | $errorCodeNodeList = $domXpath->query(self::Q_F_ERR); |
|
| 84 | ||
| 85 | if ($errorCodeNodeList->length > 0) { |
|
| 86 | $errorCatNode = $domXpath->query(self::Q_F_CAT)->item(0); |
|
| 87 | $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode)); |
|
| 88 | ||
| 89 | $code = $errorCodeNodeList->item(0)->nodeValue; |
|
| 90 | $errorTextNodeList = $domXpath->query(self::Q_F_MSG); |
|
| 91 | $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList); |
|
| 92 | ||
| 93 | $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'fp'); |
|
| 94 | } |
|
| 95 | ||
| 96 | //Deficient FOP level errors: |
|
| 97 | $errorCodeNodeList = $domXpath->query(self::Q_D_ERR); |
|
| @@ 99-109 (lines=11) @@ | ||
| 96 | //Deficient FOP level errors: |
|
| 97 | $errorCodeNodeList = $domXpath->query(self::Q_D_ERR); |
|
| 98 | ||
| 99 | if ($errorCodeNodeList->length > 0) { |
|
| 100 | $errorCatNode = $domXpath->query(self::Q_D_CAT)->item(0); |
|
| 101 | $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode)); |
|
| 102 | ||
| 103 | $code = $errorCodeNodeList->item(0)->nodeValue; |
|
| 104 | ||
| 105 | $errorTextNodeList = $domXpath->query(self::Q_D_MSG); |
|
| 106 | $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList); |
|
| 107 | ||
| 108 | $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'deficient_fop'); |
|
| 109 | } |
|
| 110 | ||
| 111 | //authorization failure: |
|
| 112 | $errorCodeNodeList = $domXpath->query(self::Q_A_ERR); |
|
| @@ 114-124 (lines=11) @@ | ||
| 111 | //authorization failure: |
|
| 112 | $errorCodeNodeList = $domXpath->query(self::Q_A_ERR); |
|
| 113 | ||
| 114 | if ($errorCodeNodeList->length > 0) { |
|
| 115 | $errorCatNode = $domXpath->query(self::Q_A_CAT)->item(0); |
|
| 116 | $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode)); |
|
| 117 | ||
| 118 | $code = $errorCodeNodeList->item(0)->nodeValue; |
|
| 119 | ||
| 120 | $errorTextNodeList = $domXpath->query(self::Q_A_MSG); |
|
| 121 | $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList); |
|
| 122 | ||
| 123 | $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'authorization_failure'); |
|
| 124 | } |
|
| 125 | ||
| 126 | return $analyzeResponse; |
|
| 127 | } |
|
| @@ 62-71 (lines=10) @@ | ||
| 59 | ||
| 60 | //General error level in the transmissionError location: |
|
| 61 | $errorCodeNodeList = $domXpath->query(self::Q_G_ERR); |
|
| 62 | if ($errorCodeNodeList->length > 0) { |
|
| 63 | $errorCatNode = $domXpath->query(self::Q_G_CAT)->item(0); |
|
| 64 | $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode)); |
|
| 65 | ||
| 66 | $code = $errorCodeNodeList->item(0)->nodeValue; |
|
| 67 | $errorTextNodeList = $domXpath->query(self::Q_G_MSG); |
|
| 68 | $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList); |
|
| 69 | ||
| 70 | $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'general'); |
|
| 71 | } |
|
| 72 | ||
| 73 | //Deficient FOP level errors: |
|
| 74 | $errorCodeNodeList = $domXpath->query(self::Q_D_ERR); |
|
| @@ 76-86 (lines=11) @@ | ||
| 73 | //Deficient FOP level errors: |
|
| 74 | $errorCodeNodeList = $domXpath->query(self::Q_D_ERR); |
|
| 75 | ||
| 76 | if ($errorCodeNodeList->length > 0) { |
|
| 77 | $errorCatNode = $domXpath->query(self::Q_D_CAT)->item(0); |
|
| 78 | $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode)); |
|
| 79 | ||
| 80 | $code = $errorCodeNodeList->item(0)->nodeValue; |
|
| 81 | ||
| 82 | $errorTextNodeList = $domXpath->query(self::Q_D_MSG); |
|
| 83 | $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList); |
|
| 84 | ||
| 85 | $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'deficient_fop'); |
|
| 86 | } |
|
| 87 | ||
| 88 | return $analyzeResponse; |
|
| 89 | } |
|