Docs For Class Apache_Solr_Response

## 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 48)

Class Constant Summary
SVN_ID = '$Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $'
SVN_REVISION = '$Revision: 54 $'
Variable Summary
mixed $_collapseSingleValueArrays
boolean $_createDocuments
boolean $_isParsed
mixed $_parsedData
Apache_Solr_HttpTransport_Response $_response
Method Summary
Apache_Solr_HttpTransport_Response __construct (Apache_Solr_HttpTransport_Response $response, [boolean $createDocuments = true], [boolean $collapseSingleValueArrays = true])
string getEncoding ()
integer getHttpStatus ()
string getHttpStatusMessage ()
string getRawResponse ()
string getType ()
void _parseData ()
mixed __get (string $key)
boolean __isset (string $key)
Variables
mixed $_collapseSingleValueArrays = true (line 88)

- access: protected

boolean $_createDocuments = true (line 87)

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

- access: protected

boolean $_isParsed = false (line 72)

Whether the raw response has been parsed

- access: protected

mixed $_parsedData (line 79)

Parsed representation of the data

- access: protected

Apache_Solr_HttpTransport_Response $_response (line 65)

Holds the raw response used in construction

- var: HTTP response
- access: protected

Methods
Constructor __construct (line 97)

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

- return: HTTP response
- access: public

Apache_Solr_HttpTransport_Response __construct (Apache_Solr_HttpTransport_Response $response, [boolean $createDocuments = true], [boolean $collapseSingleValueArrays = true])

- 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
- Apache_Solr_HttpTransport_Response $response

getEncoding (line 139)

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

- access: public

string getEncoding ()
getHttpStatus (line 109)

Get the HTTP status code

- access: public

integer getHttpStatus ()
getHttpStatusMessage (line 119)

Get the HTTP status message of the response

- access: public

string getHttpStatusMessage ()
getRawResponse (line 149)

Get the raw response as it was given to this object

- access: public

string getRawResponse ()
getType (line 129)

Get content type of this Solr response

- access: public

string getType ()
_parseData (line 198)

Parse the raw response into the parsed_data array for access

- throws: Apache_Solr_ParserException If the data could not be parsed
- access: protected

void _parseData ()
__get (line 160)

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

- access: public

mixed __get (string $key)

- string $key

__isset (line 182)

Magic function for isset function on parsed data

- access: public

boolean __isset (string $key)

- string $key

Class Constants
SVN_ID = '$Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $' (line 58)

SVN ID meta data for this class

SVN_REVISION = '$Revision: 54 $' (line 53)

SVN Revision meta data for this class

Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by phpDocumentor 1.4.3