PostgrestResponse
    
            
            in package
            
        
    
    
    
PostgrestResponse holds the response from the PostgREST server.
Table of Contents
Properties
- $body : string
- $contentRangeEnd : int
- $contentRangeStart : int
- $contentRangeTotal : int
- $headers : array<string|int, array<string|int, string>>
- $location : array<string, string|int|float>
- $parsedBody : null|array<string|int, mixed>
- $response : ResponseInterface
- $statusCode : int
Methods
- __construct() : mixed
- Create a new PostgrestResponse.
- getHeaders() : array<string|int, array<string|int, string>>
- Get the headers of the response.
- getLocation() : string|int|float|null
- Get the location for the column using Location header of the response.
- getRangeEnd() : int
- Get the end of the range using Content-Range header of the response.
- getRangeStart() : int
- Get the start of the range using Content-Range header of the response.
- getRangeTotal() : int
- Get the total of the range using Content-Range header of the response.
- getStatusCode() : int
- Get the status code of the response.
- rawResult() : string
- Get the raw result of the response.
- result() : array<string|int, mixed>|array<string|int, mixed>|null
- Get the parsed body of the response.
- parseContentRangeHeader() : void
- Parse the Content-Range header of the response.
- parseLocationHeader() : void
- Parse the Location header of the response.
- parseRange() : void
- Parse the range of the Content-Range header of the response.
Properties
$body
    private
        string
    $body
    
    
    
    
$contentRangeEnd
    private
        int
    $contentRangeEnd
     = 0
    
    
    
$contentRangeStart
    private
        int
    $contentRangeStart
     = 0
    
    
    
$contentRangeTotal
    private
        int
    $contentRangeTotal
     = 0
    
    
    
$headers
    private
        array<string|int, array<string|int, string>>
    $headers
    
    
    
    
$location
    private
        array<string, string|int|float>
    $location
    
    
    
    
$parsedBody
    private
        null|array<string|int, mixed>
    $parsedBody
    
    
    
    
$response
    private
        ResponseInterface
    $response
    
    
    
    
$statusCode
    private
        int
    $statusCode
    
    
    
    
Methods
__construct()
Create a new PostgrestResponse.
    public
                    __construct(ResponseInterface $response) : mixed
    Parameters
- $response : ResponseInterface
- 
                    The response from the PostgREST server. 
getHeaders()
Get the headers of the response.
    public
                    getHeaders() : array<string|int, array<string|int, string>>
    Return values
array<string|int, array<string|int, string>> —The headers of the response.
getLocation()
Get the location for the column using Location header of the response.
    public
                    getLocation(string $columnName) : string|int|float|null
    Parameters
- $columnName : string
- 
                    The name of the column. 
Return values
string|int|float|null —The location for the column.
getRangeEnd()
Get the end of the range using Content-Range header of the response.
    public
                    getRangeEnd() : int
    Return values
int —The end of the range.
getRangeStart()
Get the start of the range using Content-Range header of the response.
    public
                    getRangeStart() : int
    Return values
int —The start of the range.
getRangeTotal()
Get the total of the range using Content-Range header of the response.
    public
                    getRangeTotal() : int
    Return values
int —The total of the range.
getStatusCode()
Get the status code of the response.
    public
                    getStatusCode() : int
    Return values
int —The status code of the response.
rawResult()
Get the raw result of the response.
    public
                    rawResult() : string
    Return values
string —The raw result of the response.
result()
Get the parsed body of the response.
    public
                    result() : array<string|int, mixed>|array<string|int, mixed>|null
    Return values
array<string|int, mixed>|array<string|int, mixed>|null —The parsed body of the response.
parseContentRangeHeader()
Parse the Content-Range header of the response.
    private
                    parseContentRangeHeader() : void
    parseLocationHeader()
Parse the Location header of the response.
    private
                    parseLocationHeader() : void
    parseRange()
Parse the range of the Content-Range header of the response.
    private
                    parseRange(array<string|int, string> $startEnd, array<string|int, string> $contentRange) : void
    Parameters
- $startEnd : array<string|int, string>
- 
                    The start and end of the range. 
- $contentRange : array<string|int, string>
- 
                    The content range.