Class Apache_Solr_Response

Description

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

Currently requires json_decode which is bundled with PHP >= 5.2.0, Alternatively can be installed with PECL. Zend Framework also includes a purely PHP solution.

Located in /Response.php (line 46)


	
			
Class Constant Summary
 SVN_ID = '$Id: Response.php 19 2009-08-12 14:08:42Z donovan.jimenez $'
 SVN_REVISION = '$Revision: 19 $'
Variable Summary
Method Summary
Apache_Solr_Response __construct (string $rawResponse, [array $httpHeaders = array()], [boolean $createDocuments = true], [boolean $collapseSingleValueArrays = true])
string getEncoding ()
integer getHttpStatus ()
string getRawResponse ()
string getType ()
void _parseData ()
unknown __get (unknown_type $key)
Variables
mixed $_collapseSingleValueArrays = true (line 93)
  • access: protected
boolean $_createDocuments = true (line 92)

Data parsing flags. Determines what extra processing should be done after the data is initially converted to a data structure.

  • access: protected
mixed $_encoding (line 70)
  • access: protected
string $_httpStatus (line 70)

Parsed values from the passed in http headers

  • access: protected
mixed $_httpStatusMessage (line 70)
  • access: protected
boolean $_isParsed = false (line 77)

Whether the raw response has been parsed

  • access: protected
mixed $_parsedData (line 84)

Parsed representation of the data

  • access: protected
string $_rawResponse (line 63)

Holds the raw response used in construction

  • access: protected
mixed $_type (line 70)
  • access: protected
Methods
Constructor __construct (line 103)

Constructor. Takes the raw HTTP response body and the exploded HTTP headers

  • access: public
Apache_Solr_Response __construct (string $rawResponse, [array $httpHeaders = array()], [boolean $createDocuments = true], [boolean $collapseSingleValueArrays = true])
  • string $rawResponse
  • array $httpHeaders
  • boolean $createDocuments: Whether to convert the documents json_decoded as stdClass instances to Apache_Solr_Document instances
  • boolean $collapseSingleValueArrays: Whether to make multivalued fields appear as single values
getEncoding (line 205)

Get character encoding of this response. Should usually be utf-8, but just in case

  • access: public
string getEncoding ()
getHttpStatus (line 175)

Get the HTTP status code

  • access: public
integer getHttpStatus ()
getHttpStatusMessage (line 185)

Get the HTTP status message of the response

  • access: public
string getHttpStatusMessage ()
getRawResponse (line 215)

Get the raw response as it was given to this object

  • access: public
string getRawResponse ()
getType (line 195)

Get content type of this Solr response

  • access: public
string getType ()
_parseData (line 245)

Parse the raw response into the parsed_data array for access

  • access: protected
void _parseData ()
__get (line 226)

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

  • access: public
unknown __get (unknown_type $key)
  • unknown_type $key
Class Constants
SVN_ID = '$Id: Response.php 19 2009-08-12 14:08:42Z donovan.jimenez $' (line 56)

SVN ID meta data for this class

SVN_REVISION = '$Revision: 19 $' (line 51)

SVN Revision meta data for this class

Documentation generated on Mon, 09 Nov 2009 18:15:42 -0500 by phpDocumentor 1.4.2