Class DefaultConfig.

This class is the default implementation of the ConfigInterface.

 Methods

Get the additional information.

get(string $strKey) : mixed

Parameters

$strKey

string

The name of the information to retrieve.

Returns

mixed|| null

Get the limit for results.

getAmount() : integer
This is the amount of items to return for pagination.

Returns

integer

Get the list of fields to be retrieved.

getFields() : array

Returns

array

Get the list with filter options.

getFilter() : array

Returns

array

Get specific id.

getId() : mixed

Returns

mixed

Return flag if only ids should be returned.

getIdOnly() : boolean
SuppressWarnings (PHPMD.BooleanGetMethodName)

Returns

boolean

Get list of specific ids to be retrieved.

getIds() : array

Returns

array

Get the list of all defined sortings.

getSorting() : array
The returning array will be of 'property name' => 'ASC|DESC' nature.

Returns

array

Get the offset to start with.

getStart() : integer
This is the offset to use for pagination.

Returns

integer

Static constructor.

init() : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface
Static
todo : do we want to keep this behaviour? Third party will not know the correct class anyway.

Returns

Set the additional information.

set(string $strKey, mixed $varValue) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface

Parameters

$strKey

string

The name of the information to retrieve.

$varValue

mixed

The value to store.

Returns

Set the limit for results.

setAmount(int $intAmount) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface
This is the amount of items to return for pagination.

Parameters

$intAmount

int

The amount to use.

Returns

Set the list of fields to be retrieved.

setFields(array $arrFields) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface

Parameters

$arrFields

array

Array of property names.

Returns

Set the list with filter options.

setFilter(array $arrFilter) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface

Parameters

$arrFilter

array

The array containing the filter values.

Returns

Set a specific id for an element to be retrieved.

setId(mixed $mixId) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface

Parameters

$mixId

mixed

The id of the element to be retrieved.

Returns

Set flag for return id only.

setIdOnly(boolean $blnIdOnly) : \ContaoCommunityAlliance\DcGeneral\Data\DefaultConfig

Parameters

$blnIdOnly

boolean

Boolean flag to determine that only Ids shall be returned when calling fetchAll().

Returns

Set list of specific ids to be retrieved.

setIds(array $arrIds) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface

Parameters

$arrIds

array

The list of ids to be retrieved.

Returns

Set the list of all defined sortings.

setSorting(array $arrSorting) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface
The array must be of 'property name' => 'ASC|DESC' nature.

Parameters

$arrSorting

array

The sorting array to use.

Returns

Set the offset to start with.

setStart(integer $intStart) : \ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface
This is the offset to use for pagination.

Parameters

$intStart

integer

Number of first element to return.

Returns

Create object.

__construct() 
Private as only the data provider shall know how to instantiate.

 Properties

 

Miscellaneous arbitrary data stored in the config.

$arrData : array
see
see
 

The properties to retrieve.

$arrFields : array | null
 

The filters to use.

$arrFilter : array | null
 

The ids to be retrieved.

$arrIds : array
 

The properties to use for sorting.

$arrSorting : \ContaoCommunityAlliance\DcGeneral\Data\array(string
 

Flag determining if only the ids shall get fetched or models.

$blnIdOnly : bool
see
 

Amount of entries to be retrieved.

$intAmount : int
 

Offset for retrieving entries.

$intStart : int
 

The id of the element to be retrieved.

$mixId : mixed