MLPHP


MLPHP\RESTResponse
MarkLogic/MLPHP/RESTResponse.php at line 25

Class RESTResponse

RESTResponse

public class RESTResponse

Represents a REST response.

Author:
Mike Wooldridge

Method Summary
void

setBody(mixed result)

Set the response body.

mixed

getBody()

Get the response body.

void

setInfo(array result, mixed info)

Set the response information.

array

getInfo($index Index, str key)

Get the response information.

array

getUrl()

Get the URL.

array

getContentType()

Get the content type.

array

getHttpCode()

Get the HTTP response code.

array

getRedirectUrl()

Get the redirect URL.

array

getErrorMessage()

Get error message from REST response body.

Method Detail

MarkLogic/MLPHP/RESTResponse.php at line 38

setBody

public void setBody(mixed result)

Set the response body.

Parameters:
result - The REST result.

MarkLogic/MLPHP/RESTResponse.php at line 48

getBody

public mixed getBody()

Get the response body.

Returns:
The REST result.

MarkLogic/MLPHP/RESTResponse.php at line 58

setInfo

public void setInfo(array result, mixed info)

Set the response information.

Parameters:
result - The REST information.

MarkLogic/MLPHP/RESTResponse.php at line 69

getInfo

public array getInfo($index Index, str key)

Get the response information.

Parameters:
Index - to info property.
Returns:
The REST information.

MarkLogic/MLPHP/RESTResponse.php at line 78

getUrl

public array getUrl()

Get the URL.

Returns:
The URL.

MarkLogic/MLPHP/RESTResponse.php at line 88

getContentType

public array getContentType()

Get the content type.

Returns:
The REST information.

MarkLogic/MLPHP/RESTResponse.php at line 98

getHttpCode

public array getHttpCode()

Get the HTTP response code.

Returns:
The HTTP response code.

MarkLogic/MLPHP/RESTResponse.php at line 108

getRedirectUrl

public array getRedirectUrl()

Get the redirect URL.

Returns:
The redirect URL.

MarkLogic/MLPHP/RESTResponse.php at line 118

getErrorMessage

public array getErrorMessage()

Get error message from REST response body.

Returns:
The message.

MLPHP