- }//function getStatus()
-
-
-
- /**
- * Parses the body and returns extracted values
- *
- * @param string $body HTML document to parse
- *
- * @return array Array of key-value pairs
- */
- function parseStatus($body)
- {
- $arRetval = array();
- $arMatches = array();
- preg_match_all('#>Capture\(([^)]+)\)</#', $body, $arMatches);
- $arData = array();
- reset($arMatches[1]);
- while (current($arMatches[1])) {
- $key = current($arMatches[1]);
- $value = next($arMatches[1]);
- if (isset(self::$arTranslations[$key])) {
- $key = self::$arTranslations[$key];
- }
- if (isset(self::$arTranslations[$value])) {
- $value = self::$arTranslations[$value];
- }
- $arRetval[$key] = $value;
- next($arMatches[1]);
- }
-
- return $arRetval;
- }