You are here

class GoogleMiniResultIterator in Google Search Appliance 5

Same name and namespace in other branches
  1. 6.2 GoogleMini.php \GoogleMiniResultIterator

Hierarchy

Expanded class hierarchy of GoogleMiniResultIterator

File

./GoogleMini.php, line 342

View source
class GoogleMiniResultIterator extends ArrayIterator {
  public $time;
  public $payload;
  public $totalResults;
  function current() {
    $result = parent::current();
    return new GoogleMiniResult($result);
  }
  function __get($key) {
    return $this->payload->{$key};
  }

  /**
   * Returns an array of keymatches keyed with:
   * [link] => [title]
   *
   */
  function getKeyMatches() {
    $output = array();
    if ($this->GM) {
      foreach ($this->GM as $match) {
        $output[(string) $match->GL] = (string) $match->GD;
      }
    }
    return $output;
  }

}

Members