GraphResponse
Class GraphResponse
Tags
Table of Contents
- $_body : StreamInterface|null
- The body of the response
- $_decodedBody : array<string|int, mixed>|(string)
- The body of the response, decoded into an array
- $_headers : array<string|int, mixed>|(string)
- The headers of the response
- $_httpStatusCode : string
- The status code of the response
- $_request : mixed
- __construct() : mixed
- Creates a new Graph HTTP response entity
- getBody() : array<string|int, mixed>
- Get the decoded body of the HTTP response
- getDeltaLink() : string|null
- Gets the delta link of a response object from OData If the deltaLink is null, there are more pages in the collection; use nextLink to obtain more
- getHeaders() : array<string|int, mixed>|null
- Get the headers of the response
- getNextLink() : string|null
- Gets the next link of a response object from OData If the nextLink is null, there are no more pages
- getRawBody() : StreamInterface|null
- Get the undecoded body of the HTTP response
- getResponseAsObject() : mixed
- Converts the response JSON object to a Graph SDK object
- getStatus() : string|null
- Get the status of the HTTP response
- _decodeBody() : array<string|int, mixed>
- Decode the JSON response into an array
Properties
$_body
The body of the response
private
StreamInterface|null
$_body
$_decodedBody
The body of the response, decoded into an array
private
array<string|int, mixed>|(string)
$_decodedBody
$_headers
The headers of the response
private
array<string|int, mixed>|(string)
$_headers
$_httpStatusCode
The status code of the response
private
string
$_httpStatusCode
$_request
private
mixed
$_request
Methods
__construct()
Creates a new Graph HTTP response entity
public
__construct(object $request[, StreamInterface|null $body = null ][, string $httpStatusCode = null ][, array<string|int, mixed> $headers = null ]) : mixed
Parameters
- $request : object
-
The request
- $body : StreamInterface|null = null
-
The body of the response
- $httpStatusCode : string = null
-
The returned status code
- $headers : array<string|int, mixed> = null
-
The returned headers
Return values
mixed —getBody()
Get the decoded body of the HTTP response
public
getBody() : array<string|int, mixed>
Return values
array<string|int, mixed> —The decoded body
getDeltaLink()
Gets the delta link of a response object from OData If the deltaLink is null, there are more pages in the collection; use nextLink to obtain more
public
getDeltaLink() : string|null
Return values
string|null —deltaLink
getHeaders()
Get the headers of the response
public
getHeaders() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —The response headers
getNextLink()
Gets the next link of a response object from OData If the nextLink is null, there are no more pages
public
getNextLink() : string|null
Return values
string|null —nextLink, if provided
getRawBody()
Get the undecoded body of the HTTP response
public
getRawBody() : StreamInterface|null
Return values
StreamInterface|null —The undecoded body
getResponseAsObject()
Converts the response JSON object to a Graph SDK object
public
getResponseAsObject(mixed $returnType) : mixed
Parameters
- $returnType : mixed
-
The type to convert the object(s) to
Return values
mixed —object or array of objects of type $returnType
getStatus()
Get the status of the HTTP response
public
getStatus() : string|null
Return values
string|null —The HTTP status
_decodeBody()
Decode the JSON response into an array
private
_decodeBody() : array<string|int, mixed>
Return values
array<string|int, mixed> —The decoded response