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
__construct()
public
__construct() : mixed
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
ContextlistIndexCreate()
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
ContextlistOrderFlag()
public
static listOrderFlag(mixed $order, bool $pad) : int
Parameters
- $order : mixed
- $pad : bool
Return values
intlistRank()
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
ContextlistValue()
CtxListValue defines Lookup list by value.
public
static listValue(mixed $key) : Context
Parameters
- $key : mixed
Return values
ContextmapIndex()
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
ContextmapKey()
CtxMapKey defines Lookup map by key.
public
static mapKey(mixed $key) : Context
Parameters
- $key : mixed
Return values
ContextmapKeyCreate()
CtxMapKeyCreate creates map with given type at map key.
public
static mapKeyCreate(mixed $key, mixed $order) : Context
Parameters
- $key : mixed
- $order : mixed
Return values
ContextmapRank()
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
ContextmapValue()
CtxMapValue defines Lookup map by value.
public
static mapValue(mixed $key) : Context
Parameters
- $key : mixed