You are here

public function Apache_Solr_Response::__get in Apache Solr Search 5

Magic get to expose the parsed data and to lazily load it

Parameters

unknown_type $key:

Return value

unknown

File

SolrPhpClient/Apache/Solr/Response.php, line 202

Class

Apache_Solr_Response
Represents a Solr response. Parses the raw response into a set of stdClass objects and associative arrays for easy access.

Code

public function __get($key) {
  if (!$this->_isParsed) {
    $this
      ->_parseData();
    $this->_isParsed = true;
  }
  if (isset($this->_parsedData->{$key})) {
    return $this->_parsedData->{$key};
  }
  return null;
}