public static function parse($response) { if (Tag::setof($tag, $response, "Error")) { throw new Exception($tag->f("Message.value()")); } $obj = new self(); if (Tag::setof($tag, $response, "ResultSet")) { $ma_result = $tag->f("ma_result"); $obj->total_count($ma_result->f("total_count.value()")); $obj->filtered_count($ma_result->f("filtered_count.value()")); $obj->ma(YahooMAWord::parse($ma_result->f("word_list"))); $obj->uniq(YahooMAWord::parse($tag->f("uniq_result")->f("word_list"))); } return $obj; }