HALResponse

Extends \NextEvent\PHPSDK\Model\APIResponse

Class HALResponse

A wrapper class for Responses returned by GuzzleHttp. The Responses are parsed as HAL+JSON and made accessible by this class.

package

NextEvent\PHPSDK\REST

Methods

APIResponse constructor.

__construct(\NextEvent\PHPSDK\Model\ResponseInterface $response) 
inherited

Wrapping a ResponseInterface for use in SDK

Throws
\NextEvent\PHPSDK\Exception\InvalidArgumentException

Arguments

$response

\NextEvent\PHPSDK\Model\ResponseInterface

Get JSON content from Request

getContent() : array
inherited

Response

array

Get the entities embedded in this response

getEmbedded() : array

Response

array

Get the current page

getPage() : integer

Response

integer

Current page of the result set, starting at 1

Get the number of pages

getPageCount() : integer

Response

integer

Get the page size

getPageSize() : integer

Response

integer

Number of items per page

Get the unique identifier of the API request

getRequestID() : string
inherited

Use this in support inquiries to let us track the request in our logs

Response

string

Get the underlying HTTP response message

getResponse() : \NextEvent\PHPSDK\Model\ResponseInterface
inherited

Response

\NextEvent\PHPSDK\Model\ResponseInterface

Get the total number of items

getTotalItems() : integer

Response

integer

Number of items in this result set

Return object representation for log context

toLogContext() : array
inherited

Response

array