You are here

public function Apache_Solr_Document::valid in Apache Solr Search 5

Iterator implementation function, proxies to _fields. Allows usage:

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

File

SolrPhpClient/Apache/Solr/Document.php, line 196

Class

Apache_Solr_Document
Holds Key / Value pairs that represent a Solr Document. Field values can be accessed by direct dereferencing such as: <code> ... $document->title = 'Something'; echo $document->title; ... </code>

Code

public function valid() {
  return current($this->_fields) !== false;
}