public function SearchApiSolrDocument::getIterator in Search API Solr 7
Implements IteratorAggregate::getIterator().
Implementing the IteratorAggregate interface allows the following usage:
foreach ($document as $key => $value) {
// ...
}
Return value
Traversable An iterator over this document's fields.
File
- includes/
document.inc, line 373
Class
- SearchApiSolrDocument
- Holds Key / Value pairs that represent a Solr Document along with any associated boost values. Field values can be accessed by direct dereferencing such as:
Code
public function getIterator() {
$arrayObject = new ArrayObject($this->fields);
return $arrayObject
->getIterator();
}