CSItemComparatorData
in package
Data transporter object.
With this class you may transfer data to CSItemComparator.
Tags
Table of Contents
- __construct() : mixed
- As first parameter a record/item type, as second mixed data.
- addParam() : mixed
- Add a param to params array.
- checkForValidMode() : bool
- Checks if the given mode is a valid one.
- encodeDataParams() : mixed|string
- Encode all data for further use on client side.
- getItems() : null
- Gets the items.
- getMode() : string
- Returns the comparator mode.
- getParam() : mixed
- Get a specific param, which was added.
- getParams() : array<string|int, mixed>
- Returns all params.
- getType() : string
- Gets the type of the record/item
- isAdaptable() : bool
- Returns whether the comparator is adaptable or not.
- setAdaptable() : mixed
- De-/activate the comparator to adapt the values.
- setItems() : mixed
- Sets the items.
- setMode() : void
- Defines the comparator mode
- setParams() : bool
- Sets the additional params.
- setType() : mixed
- Set the given record/item type
- toArray() : array<string|int, mixed>
- Converts all information form this object into an array.
Methods
__construct()
As first parameter a record/item type, as second mixed data.
public
__construct(string $sRecordType, mixed $mItemsData) : mixed
Parameters
- $sRecordType : string
- $mItemsData : mixed
Tags
Return values
mixed —addParam()
Add a param to params array.
public
addParam(mixed $sKey, mixed $sValue) : mixed
Parameters
- $sKey : mixed
- $sValue : mixed
Tags
Return values
mixed —checkForValidMode()
Checks if the given mode is a valid one.
public
checkForValidMode(string $sModeToCheck) : bool
One of the following modes are valid:
Parameters
- $sModeToCheck : string
-
Mode to check.
Tags
Return values
bool —Returns TRUE if the given mode is under the valid ones FALSE otherwise.
encodeDataParams()
Encode all data for further use on client side.
public
encodeDataParams() : mixed|string
Tags
Return values
mixed|string —An encoded string in JSON format.
getItems()
Gets the items.
public
getItems() : null
Tags
Return values
null —getMode()
Returns the comparator mode.
public
getMode() : string
Tags
Return values
string —getParam()
Get a specific param, which was added.
public
getParam(mixed $sKey) : mixed
Parameters
- $sKey : mixed
Tags
Return values
mixed —getParams()
Returns all params.
public
getParams() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getType()
Gets the type of the record/item
public
getType() : string
Tags
Return values
string —isAdaptable()
Returns whether the comparator is adaptable or not.
public
isAdaptable() : bool
Tags
Return values
bool —setAdaptable()
De-/activate the comparator to adapt the values.
public
setAdaptable(bool $bIsAdaptable) : mixed
Parameters
- $bIsAdaptable : bool
Tags
Return values
mixed —setItems()
Sets the items.
public
setItems(mixed $mItems) : mixed
It may be a valid JSON or an array. the data structure will be checked later on in CSItemComparator.
Parameters
- $mItems : mixed
Tags
Return values
mixed —setMode()
Defines the comparator mode
public
setMode(string $sMode) : void
Parameters
- $sMode : string
-
One of the following constants CSItemComparatorConst::MODE_*
Tags
Return values
void —setParams()
Sets the additional params.
public
setParams(mixed $mParams) : bool
It may be a valid JSON or an array.
Parameters
- $mParams : mixed
Tags
Return values
bool —If it settings params was successfully or not.
setType()
Set the given record/item type
public
setType(string $sType) : mixed
Parameters
- $sType : string
Tags
Return values
mixed —toArray()
Converts all information form this object into an array.
public
toArray() : array<string|int, mixed>
