Response
extends Response
in package
IBS Response
Table of Contents
Properties
- $columnkeys : array<string|int, string>
- Column names available in this response
- $columns : array<string|int, Column>
- Container of Column Instances
- $command : array<string|int, string>
- The API Command used within this request
- $hash : array<string, mixed>
- hash representation of plain API response
- $paginationkeys : string
- Regex for pagination related column keys
- $raw : string
- plain API response
- $recordIndex : int
- Record Index we currently point to in record list
- $records : array<string|int, Record>
- Record List (List of rows)
- $requestUrl : string
- API request url
Methods
- __construct() : mixed
- Constructor
- addColumn() : $this
- Add a column to the column list
- addRecord() : $this
- Add a record to the record list
- getCode() : int
- Get API response code
- getColumn() : Column|null
- Get column by column name
- getColumnIndex() : string|null
- Get Data by Column Name and Index
- getColumnKeys() : array<string|int, string>
- Get Column Names
- getColumns() : array<string|int, Column>
- Get List of Columns
- getCommand() : array<string|int, string>
- Get Command used in this request
- getCommandPlain() : string
- Get Command used in this request in plain text format
- getCurrentPageNumber() : int|null
- Get Page Number of current List Query
- getCurrentRecord() : Record|null
- Get Record of current record index
- getDescription() : string
- Get API response description
- getFirstRecordIndex() : int|null
- Get Index of first row in this response
- getHash() : array<string, mixed>
- Get API response as Hash
- getLastRecordIndex() : int|null
- Get last record index of the current list query
- getListHash() : array<string|int, mixed>
- Get Response as List Hash including useful meta data for tables
- getNextPageNumber() : int|null
- Get Page Number of next list query
- getNextRecord() : Record|null
- Get next record in record list
- getNumberOfPages() : int
- Get the number of pages available for this list query
- getPagination() : array<string, int|null>
- Get object containing all paging data
- getPlain() : string
- Get Plain API response
- getPreviousPageNumber() : int|null
- Get Page Number of previous list query
- getPreviousRecord() : Record|null
- Get previous record in record list
- getQueuetime() : float
- Get Queuetime of API response
- getRecord() : Record|null
- Get Record at given index
- getRecords() : array<string|int, Record>
- Get all Records
- getRecordsCount() : int
- Get count of rows in this response
- getRecordsLimitation() : int
- Get limit(ation) setting of the current list query This is the count of requested rows
- getRecordsTotalCount() : int
- Get total count of records available for the list query
- getRequestURL() : string
- Get Request URL
- getRuntime() : float
- Get Runtime of API response
- getStatus() : string
- Get API response code
- hasNextPage() : bool
- Check if this list query has a next page
- hasPreviousPage() : bool
- Check if this list query has a previous page
- isError() : bool
- Check if current API response represents an error case API response code is an 5xx code
- isPending() : bool
- Check if current operation is returned as pending
- isSuccess() : bool
- Check if current API response represents a success case API response code is an 2xx code
- isTmpError() : bool
- Check if current API response represents a temporary error case
- rewindRecordList() : $this
- Reset index in record list back to zero
- hasColumn() : bool
- Check if column exists in response
- hasCurrentRecord() : bool
- Check if the record list contains a record for the current record index in use
- hasNextRecord() : bool
- Check if the record list contains a next record for the current record index in use
- hasPreviousRecord() : bool
- Check if the record list contains a previous record for the current record index in use
Properties
$columnkeys
Column names available in this response
protected
array<string|int, string>
$columnkeys
$columns
Container of Column Instances
protected
array<string|int, Column>
$columns
$command
The API Command used within this request
protected
array<string|int, string>
$command
$hash
hash representation of plain API response
protected
array<string, mixed>
$hash
$paginationkeys
Regex for pagination related column keys
protected
string
$paginationkeys
= "/^(.+)?count|total(_.+)?\$/"
$raw
plain API response
protected
string
$raw
$recordIndex
Record Index we currently point to in record list
protected
int
$recordIndex
$records
Record List (List of rows)
protected
array<string|int, Record>
$records
$requestUrl
API request url
protected
string
$requestUrl
= ""
Methods
__construct()
Constructor
public
__construct(string $raw[, array<string|int, string> $cmd = [] ][, array<string|int, string> $ph = [] ]) : mixed
Parameters
- $raw : string
-
API plain response
- $cmd : array<string|int, string> = []
-
API command used within this request
- $ph : array<string|int, string> = []
-
placeholder array to get vars in response description dynamically replaced
addColumn()
Add a column to the column list
public
addColumn(string $key, array<string|int, string> $data) : $this
Parameters
- $key : string
-
column name
- $data : array<string|int, string>
-
array of column data
Return values
$thisaddRecord()
Add a record to the record list
public
addRecord(array<string|int, string> $h) : $this
Parameters
- $h : array<string|int, string>
-
row hash data
Return values
$thisgetCode()
Get API response code
public
getCode() : int
Return values
intgetColumn()
Get column by column name
public
getColumn(string $key) : Column|null
Parameters
- $key : string
-
column name
Return values
Column|nullgetColumnIndex()
Get Data by Column Name and Index
public
getColumnIndex(string $colkey, int $index) : string|null
Parameters
- $colkey : string
-
column name
- $index : int
-
column data index
Return values
string|nullgetColumnKeys()
Get Column Names
public
getColumnKeys([bool $filterPaginationKeys = false ]) : array<string|int, string>
Parameters
- $filterPaginationKeys : bool = false
-
strip pagination columns
Return values
array<string|int, string>getColumns()
Get List of Columns
public
getColumns() : array<string|int, Column>
Return values
array<string|int, Column>getCommand()
Get Command used in this request
public
getCommand() : array<string|int, string>
Return values
array<string|int, string>getCommandPlain()
Get Command used in this request in plain text format
public
getCommandPlain() : string
Return values
stringgetCurrentPageNumber()
Get Page Number of current List Query
public
getCurrentPageNumber() : int|null
Return values
int|nullgetCurrentRecord()
Get Record of current record index
public
getCurrentRecord() : Record|null
Return values
Record|nullgetDescription()
Get API response description
public
getDescription() : string
Return values
stringgetFirstRecordIndex()
Get Index of first row in this response
public
getFirstRecordIndex() : int|null
Return values
int|nullgetHash()
Get API response as Hash
public
getHash() : array<string, mixed>
Return values
array<string, mixed>getLastRecordIndex()
Get last record index of the current list query
public
getLastRecordIndex() : int|null
Return values
int|nullgetListHash()
Get Response as List Hash including useful meta data for tables
public
getListHash() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getNextPageNumber()
Get Page Number of next list query
public
getNextPageNumber() : int|null
Return values
int|nullgetNextRecord()
Get next record in record list
public
getNextRecord() : Record|null
Return values
Record|nullgetNumberOfPages()
Get the number of pages available for this list query
public
getNumberOfPages() : int
Return values
intgetPagination()
Get object containing all paging data
public
getPagination() : array<string, int|null>
Return values
array<string, int|null>getPlain()
Get Plain API response
public
getPlain() : string
Return values
stringgetPreviousPageNumber()
Get Page Number of previous list query
public
getPreviousPageNumber() : int|null
Return values
int|nullgetPreviousRecord()
Get previous record in record list
public
getPreviousRecord() : Record|null
Return values
Record|nullgetQueuetime()
Get Queuetime of API response
public
getQueuetime() : float
Tags
Return values
floatgetRecord()
Get Record at given index
public
getRecord(int $idx) : Record|null
Parameters
- $idx : int
-
record index
Return values
Record|nullgetRecords()
Get all Records
public
getRecords() : array<string|int, Record>
Return values
array<string|int, Record>getRecordsCount()
Get count of rows in this response
public
getRecordsCount() : int
Return values
intgetRecordsLimitation()
Get limit(ation) setting of the current list query This is the count of requested rows
public
getRecordsLimitation() : int
Return values
intgetRecordsTotalCount()
Get total count of records available for the list query
public
getRecordsTotalCount() : int
Return values
intgetRequestURL()
Get Request URL
public
getRequestURL() : string
Return values
stringgetRuntime()
Get Runtime of API response
public
getRuntime() : float
Tags
Return values
floatgetStatus()
Get API response code
public
getStatus() : string
Return values
stringhasNextPage()
Check if this list query has a next page
public
hasNextPage() : bool
Return values
boolhasPreviousPage()
Check if this list query has a previous page
public
hasPreviousPage() : bool
Return values
boolisError()
Check if current API response represents an error case API response code is an 5xx code
public
isError() : bool
Return values
boolisPending()
Check if current operation is returned as pending
public
isPending() : bool
Tags
Return values
boolisSuccess()
Check if current API response represents a success case API response code is an 2xx code
public
isSuccess() : bool
Return values
boolisTmpError()
Check if current API response represents a temporary error case
public
isTmpError() : bool
Tags
Return values
boolrewindRecordList()
Reset index in record list back to zero
public
rewindRecordList() : $this
Return values
$thishasColumn()
Check if column exists in response
private
hasColumn(string $key) : bool
Parameters
- $key : string
-
column name
Return values
boolhasCurrentRecord()
Check if the record list contains a record for the current record index in use
private
hasCurrentRecord() : bool
Return values
boolhasNextRecord()
Check if the record list contains a next record for the current record index in use
private
hasNextRecord() : bool
Return values
boolhasPreviousRecord()
Check if the record list contains a previous record for the current record index in use
private
hasPreviousRecord() : bool