class GoogleMiniResultIterator in Google Search Appliance 6.2
Same name and namespace in other branches
- 5 GoogleMini.php \GoogleMiniResultIterator
Hierarchy
- class \GoogleMiniResultIterator extends \ArrayIterator
Expanded class hierarchy of GoogleMiniResultIterator
File
- ./
GoogleMini.php, line 367
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;
}
/**
* Returns an array of synonyms.
*/
function getSynonyms() {
$output = array();
if ($this->Synonyms) {
foreach ($this->Synonyms
->children() as $child) {
$output[] = (string) $child['q'];
}
}
return $output;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GoogleMiniResultIterator:: |
public | property | ||
GoogleMiniResultIterator:: |
public | property | ||
GoogleMiniResultIterator:: |
public | property | ||
GoogleMiniResultIterator:: |
function | |||
GoogleMiniResultIterator:: |
function | Returns an array of keymatches keyed with: [link] => [title] | ||
GoogleMiniResultIterator:: |
function | Returns an array of synonyms. | ||
GoogleMiniResultIterator:: |
function |