\Apache_Solr_Response
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.
Synopsis
class Apache_Solr_Response
{
- // constants
- const SVN_REVISION = '$Revision$';
- const SVN_ID = '$Id$';
- // members
- protected Apache_Solr_HttpTransport_Response $_response;
- protected boolean $_isParsed = false;
- protected $_parsedData;
- protected boolean $_createDocuments = true;
- // methods
- public Apache_Solr_HttpTransport_Response __construct()
- public integer getHttpStatus()
- public string getHttpStatusMessage()
- public string getType()
- public string getEncoding()
- public string getRawResponse()
- public mixed __get()
- public boolean __isset()
- protected void _parseData()
Constants
Name | Value |
---|---|
SVN_REVISION | '$Revision$' |
SVN_ID | '$Id$' |
Members
protected
- $_createDocuments
—
boolean
Data parsing flags. Determines what extra processing should be done after the data is initially converted to a data structure. - $_isParsed
—
boolean
Whether the raw response has been parsed - $_parsedData
—
mixed
Parsed representation of the data - $_response
—
Apache_Solr_HttpTransport_Response
Holds the raw response used in construction
Methods
protected
- _parseData() — Parse the raw response into the parsed_data array for access
public
- __construct() — Constructor. Takes the raw HTTP response body and the exploded HTTP headers
- __get() — Magic get to expose the parsed data and to lazily load it
- __isset() — Magic function for isset function on parsed data
- getEncoding() — Get character encoding of this response. Should usually be utf-8, but just in case
- getHttpStatus() — Get the HTTP status code
- getHttpStatusMessage() — Get the HTTP status message of the response
- getRawResponse() — Get the raw response as it was given to this object
- getType() — Get content type of this Solr response