PHP SDK by CNIC

Response
in package

HEXONET Response

Table of Contents

$columnkeys  : array<string|int, string>
Column names available in this responsse
$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)
__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|int, 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
getRuntime()  : float
Get Runtime of API response
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 API response code is an 4xx code
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 responsse

private array<string|int, string> $columnkeys

$columns

Container of Column Instances

private array<string|int, Column> $columns

$command

The API Command used within this request

private array<string|int, string> $command

$hash

hash representation of plain API response

private array<string, mixed> $hash

$paginationkeys

Regex for pagination related column keys

private string $paginationkeys = "/^TOTAL|COUNT|LIMIT|FIRST|LAST\$/"

$raw

plain API response

private string $raw

$recordIndex

Record Index we currently point to in record list

private int $recordIndex

$records

Record List (List of rows)

private array<string|int, Record> $records

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

Return values
mixed

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
$this

addRecord()

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
$this

getCode()

Get API response code

public getCode() : int
Return values
int

API response code

getColumn()

Get column by column name

public getColumn(string $key) : Column|null
Parameters
$key : string

column name

Return values
Column|null

column instance or null if column does not exist

getColumnIndex()

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|null

column data at index or null if not found

getColumnKeys()

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>

Array of Column Names

getColumns()

Get List of Columns

public getColumns() : array<string|int, Column>
Return values
array<string|int, Column>

Array of Columns

getCommand()

Get Command used in this request

public getCommand() : array<string|int, string>
Return values
array<string|int, string>

command

getCommandPlain()

Get Command used in this request in plain text format

public getCommandPlain() : string
Return values
string

command

getCurrentPageNumber()

Get Page Number of current List Query

public getCurrentPageNumber() : int|null
Return values
int|null

page number or null in case of a non-list response

getCurrentRecord()

Get Record of current record index

public getCurrentRecord() : Record|null
Return values
Record|null

Record or null in case of a non-list response

getDescription()

Get API response description

public getDescription() : string
Return values
string

API response description

getFirstRecordIndex()

Get Index of first row in this response

public getFirstRecordIndex() : int|null
Return values
int|null

first row index

getHash()

Get API response as Hash

public getHash() : array<string|int, mixed>
Return values
array<string|int, mixed>

API response hash

getLastRecordIndex()

Get last record index of the current list query

public getLastRecordIndex() : int|null
Return values
int|null

record index or null for a non-list response

getListHash()

Get Response as List Hash including useful meta data for tables

public getListHash() : array<string|int, mixed>
Return values
array<string|int, mixed>

hash including list meta data and array of rows in hash notation

getNextPageNumber()

Get Page Number of next list query

public getNextPageNumber() : int|null
Return values
int|null

page number or null if there's no next page

getNextRecord()

Get next record in record list

public getNextRecord() : Record|null
Return values
Record|null

Record or null in case there's no further record

getNumberOfPages()

Get the number of pages available for this list query

public getNumberOfPages() : int
Return values
int

number of pages

getPagination()

Get object containing all paging data

public getPagination() : array<string, int|null>
Return values
array<string, int|null>

paginator data

getPlain()

Get Plain API response

public getPlain() : string
Return values
string

Plain API response

getPreviousPageNumber()

Get Page Number of previous list query

public getPreviousPageNumber() : int|null
Return values
int|null

page number or null if there's no previous page

getPreviousRecord()

Get previous record in record list

public getPreviousRecord() : Record|null
Return values
Record|null

Record or null if there's no previous record

getQueuetime()

Get Queuetime of API response

public getQueuetime() : float
Return values
float

Queuetime of API response

getRecord()

Get Record at given index

public getRecord(int $idx) : Record|null
Parameters
$idx : int

record index

Return values
Record|null

Record or null if index does not exist

getRecords()

Get all Records

public getRecords() : array<string|int, Record>
Return values
array<string|int, Record>

array of records

getRecordsCount()

Get count of rows in this response

public getRecordsCount() : int
Return values
int

count of rows

getRecordsLimitation()

Get limit(ation) setting of the current list query This is the count of requested rows

public getRecordsLimitation() : int
Return values
int

limit setting or count requested rows

getRecordsTotalCount()

Get total count of records available for the list query

public getRecordsTotalCount() : int
Return values
int

total count of records or count of records for a non-list response

getRuntime()

Get Runtime of API response

public getRuntime() : float
Return values
float

Runtime of API response

hasNextPage()

Check if this list query has a next page

public hasNextPage() : bool
Return values
bool

boolean result

hasPreviousPage()

Check if this list query has a previous page

public hasPreviousPage() : bool
Return values
bool

boolean result

isError()

Check if current API response represents an error case API response code is an 5xx code

public isError() : bool
Return values
bool

boolean result

isPending()

Check if current operation is returned as pending

public isPending() : bool
Return values
bool

bool result

isSuccess()

Check if current API response represents a success case API response code is an 2xx code

public isSuccess() : bool
Return values
bool

boolean result

isTmpError()

Check if current API response represents a temporary error case API response code is an 4xx code

public isTmpError() : bool
Return values
bool

boolean result

rewindRecordList()

Reset index in record list back to zero

public rewindRecordList() : $this
Return values
$this

hasColumn()

Check if column exists in response

private hasColumn(string $key) : bool
Parameters
$key : string

column name

Return values
bool

boolean result

hasCurrentRecord()

Check if the record list contains a record for the current record index in use

private hasCurrentRecord() : bool
Return values
bool

boolean result

hasNextRecord()

Check if the record list contains a next record for the current record index in use

private hasNextRecord() : bool
Return values
bool

boolean result

hasPreviousRecord()

Check if the record list contains a previous record for the current record index in use

private hasPreviousRecord() : bool
Return values
bool

boolean result

Search results