class ChoiceSource

This class allows the storage and retrieval of the attributes of a ChoiceSource object

A ChoiceSource object stores the name of the column that contains the value that will be assigned to a Choice object in a choices list. It also stores the name of the column that contains the label assigned to the Choice object. The same for the id of the Choice object.

The contents of these columns are the result of a query on a database from a reference data source.

Properties

private Data $data
private int $id
private string $idColumn
private string $valueColumn
private string $labelColumn
private bool $caseInsensitive

Methods

void
__construct(Data $data, int $id, string $valueColumn, string $labelColumn)

Constructor of class ChoiceSource

getData()

Retrieves the Data object that uses this ChoiceSource

int
getId()

Retrieves the ID of this ChoiceSource object

void
setId(int $id)

Sets the ID of this ChoiceSource object

bool
isCaseInsensitive()

Returns the caseInsensitive attribute of this ChoiceSource object

bool
getCaseInsensitive()

Returns the caseInsensitive attribute of this ChoiceSource object

void
setCaseInsensitive(bool $caseInsensitive = true)

Determines whether columns names are case-insensitive or not.

string
getIdColumn()

Retrieves the name of the column that contains the ID that will be assigned to a Choice object in a choices list.

void
setIdColumn(string $idColumn)

Sets the name of the column that contains the ID that will be assigned to a Choice object in a choices list.

string
getValueColumn()

Retrieves the name of the column that contains the value that will be assigned to a Choice object in a choices list.

void
setValueColumn(string $valueColumn)

Sets the name of the column that contains the value that will be assigned to a Choice object in a choices list.

string
getLabelColumn()

Retrieves the name of the column that contains the label that will be assigned to a Choice object in a choices list.

void
setLabelColumn(string $labelColumn)

Sets the name of the column that contains the label that will be assigned to a Choice object in a choices list.

Details

at line 103
void __construct(Data $data, int $id, string $valueColumn, string $labelColumn)

Constructor of class ChoiceSource

Parameters

Data $data The Data object that uses this ChoiceSource
int $id The ID of this ChoiceSource object
string $valueColumn The name of the column that contains the value that will be assigned to a Choice object in a choices list.
string $labelColumn The name of the column that contains the label that will be assigned to a Choice object in a choices list.

Return Value

void

at line 117
Data getData()

Retrieves the Data object that uses this ChoiceSource

Return Value

Data The Data object that uses this ChoiceSource

at line 128
int getId()

Retrieves the ID of this ChoiceSource object

Return Value

int The ID of this ChoiceSource object

at line 140
void setId(int $id)

Sets the ID of this ChoiceSource object

Parameters

int $id The ID of this ChoiceSource object

Return Value

void

at line 151
bool isCaseInsensitive()

Returns the caseInsensitive attribute of this ChoiceSource object

Return Value

bool the value of caseInsensitive

at line 162
bool getCaseInsensitive()

Returns the caseInsensitive attribute of this ChoiceSource object

Return Value

bool the value of caseInsensitive

at line 174
void setCaseInsensitive(bool $caseInsensitive = true)

Determines whether columns names are case-insensitive or not.

Parameters

bool $caseInsensitive (default: true) Case Insensitive or not

Return Value

void

at line 187
string getIdColumn()

Retrieves the name of the column that contains the ID that will be assigned to a Choice object in a choices list.

If the column name is case insensitive, it is converted to lowercase.

Return Value

string The name of the column that contains the ID.

at line 199
void setIdColumn(string $idColumn)

Sets the name of the column that contains the ID that will be assigned to a Choice object in a choices list.

Parameters

string $idColumn The name of the column that contains the ID.

Return Value

void

at line 212
string getValueColumn()

Retrieves the name of the column that contains the value that will be assigned to a Choice object in a choices list.

If the column name is case insensitive, it is converted to lowercase.

Return Value

string The name of the column that contains the value.

at line 224
void setValueColumn(string $valueColumn)

Sets the name of the column that contains the value that will be assigned to a Choice object in a choices list.

Parameters

string $valueColumn The name of the column that contains the value.

Return Value

void

at line 237
string getLabelColumn()

Retrieves the name of the column that contains the label that will be assigned to a Choice object in a choices list.

If the column name is case insensitive, it is converted to lowercase.

Return Value

string The name of the column that contains the label

at line 249
void setLabelColumn(string $labelColumn)

Sets the name of the column that contains the label that will be assigned to a Choice object in a choices list.

Parameters

string $labelColumn The name of the column that contains the label.

Return Value

void