You are here

public function ApacheSolrDocument::getIterator in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 Apache_Solr_Document.php \ApacheSolrDocument::getIterator()
  2. 7 Apache_Solr_Document.php \ApacheSolrDocument::getIterator()

IteratorAggregate implementation function. Allows usage:

<code> foreach ($document as $key => $value) { ... } </code>

File

./Apache_Solr_Document.php, line 291

Class

ApacheSolrDocument
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> ... $document->title = 'Something'; echo…

Code

public function getIterator() {
  $arrayObject = new ArrayObject($this->_fields);
  return $arrayObject
    ->getIterator();
}