Dictionary
Table of Contents
Methods
- __construct() : mixed
- create() : void
- Creates new dictionary for information block.
- drop() : void
- Deletes existing dictionary in the database.
- getIblockId() : int
- Returns information block identifier.
- getStringById() : string
- Returns string by its identifier in the dictionary.
- getStringByIds() : array<string|int, mixed>
- Returns array of string by its identifier in the dictionary.
- getStringId() : int
- Returns unique number presentation of the string.
- getTableName() : string
- Internal method to get database table name for storing values.
- isExists() : bool
- Checks if dictionary exists in the database.
- validateValue() : mixed
- Returns validators for VALUE field.
Methods
__construct()
public
__construct(int $iblockId) : mixed
Parameters
- $iblockId : int
-
Information block identifier.
create()
Creates new dictionary for information block.
public
create() : void
You have to be sure that dictionary does not exists.
drop()
Deletes existing dictionary in the database.
public
drop() : void
You have to check that dictionary exists before calling this method.
getIblockId()
Returns information block identifier.
public
getIblockId() : int
Return values
intgetStringById()
Returns string by its identifier in the dictionary.
public
getStringById(int $valueId) : string
Parameters
- $valueId : int
-
Value identifier for dictionary lookup.
Return values
stringgetStringByIds()
Returns array of string by its identifier in the dictionary.
public
getStringByIds(array<string|int, mixed> $valueIDs) : array<string|int, mixed>
Parameters
- $valueIDs : array<string|int, mixed>
-
Value identifier for dictionary lookup.
Return values
array<string|int, mixed>getStringId()
Returns unique number presentation of the string.
public
getStringId(string $value[, bool $addWhenNotFound = true ]) : int
Parameters
- $value : string
-
Value for dictionary lookup.
- $addWhenNotFound : bool = true
-
Add new value to the dictionary if none found.
Return values
intgetTableName()
Internal method to get database table name for storing values.
public
getTableName() : string
Return values
stringisExists()
Checks if dictionary exists in the database.
public
isExists() : bool
Returns true on success.
Return values
boolvalidateValue()
Returns validators for VALUE field.
public
static validateValue() : mixed
This is an internal method for eAccelerator compatibility.