Documentation

Context
in package

CDTContext defines Nested CDT context. Identifies the location of nested list/map to apply the operation for the current level.

An array of CTX identifies location of the list/map on multiple levels on nesting.

Table of Contents

Methods

__construct()  : mixed
listIndex()  : Context
CtxListIndex defines Lookup list by index offset.
listIndexCreate()  : Context
CtxListIndexCreate list with given type at index offset, given an order and pad.
listOrderFlag()  : int
listRank()  : Context
CtxListRank defines Lookup list by rank.
listValue()  : Context
CtxListValue defines Lookup list by value.
mapIndex()  : Context
CtxMapIndex defines Lookup map by index offset.
mapKey()  : Context
CtxMapKey defines Lookup map by key.
mapKeyCreate()  : Context
CtxMapKeyCreate creates map with given type at map key.
mapRank()  : Context
CtxMapRank defines Lookup map by rank.
mapValue()  : Context
CtxMapValue defines Lookup map by value.

Methods

listIndex()

CtxListIndex defines Lookup list by index offset.

public static listIndex(int $index) : Context

If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. Examples: 0: First item. 4: Fifth item. -1: Last item. -3: Third to last item.

Parameters
$index : int
Return values
Context

listIndexCreate()

CtxListIndexCreate list with given type at index offset, given an order and pad.

public static listIndexCreate(int $index, mixed $order, bool $pad) : Context
Parameters
$index : int
$order : mixed
$pad : bool
Return values
Context

listOrderFlag()

public static listOrderFlag(mixed $order, bool $pad) : int
Parameters
$order : mixed
$pad : bool
Return values
int

listRank()

CtxListRank defines Lookup list by rank.

public static listRank(int $rank) : Context

0 = smallest value N = Nth smallest value -1 = largest value

Parameters
$rank : int
Return values
Context

mapIndex()

CtxMapIndex defines Lookup map by index offset.

public static mapIndex(int $index) : Context

If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. Examples: 0: First item. 4: Fifth item. -1: Last item. -3: Third to last item.

Parameters
$index : int
Return values
Context

mapKeyCreate()

CtxMapKeyCreate creates map with given type at map key.

public static mapKeyCreate(mixed $key, mixed $order) : Context
Parameters
$key : mixed
$order : mixed
Return values
Context

mapRank()

CtxMapRank defines Lookup map by rank.

public static mapRank(int $rank) : Context

0 = smallest value N = Nth smallest value -1 = largest value

Parameters
$rank : int
Return values
Context

        
On this page

Search results