Storage
Table of Contents
Constants
- DATETIME = 5
- DICTIONARY = 2
- NUMERIC = 4
- PRICE = 1
- STRING = 3
Methods
- __construct() : mixed
- addIndexEntry() : bool
- Adds new index entry.
- create() : void
- Creates new property values index for information block.
- deleteIndexElement() : bool
- Deletes all element entries from the index.
- drop() : void
- Deletes existing index from the database.
- facetIdToPriceId() : int
- Converts internal storage facet identifier into catalog price identifier.
- facetIdToPropertyId() : int
- Converts internal storage facet identifier into iblock property identifier.
- flushIndexEntries() : bool
- Writes all index entries from the queue to the database.
- getIblockId() : int
- Returns information block identifier.
- getLastStoredElementId() : int
- Returns maximum stored element identifier.
- getTableName() : string
- Internal method to get database table name for storing property index.
- isExists() : bool
- Checks if property index exists in the database.
- isPriceId() : bool
- Returns true if given identifier is catalog price one.
- isPropertyId() : bool
- Returns true if given identifier is iblock property one.
- priceIdToFacetId() : int
- Converts catalog price identifier into internal storage facet identifier.
- propertyIdToFacetId() : int
- Converts iblock property identifier into internal storage facet identifier.
- queueIndexEntry() : bool
- Adds index entry to an queue for batch add.
Constants
DATETIME
public
mixed
DATETIME
= 5
DICTIONARY
public
mixed
DICTIONARY
= 2
NUMERIC
public
mixed
NUMERIC
= 4
PRICE
public
mixed
PRICE
= 1
STRING
public
mixed
STRING
= 3
Methods
__construct()
public
__construct(int $iblockId) : mixed
Parameters
- $iblockId : int
-
Information block identifier.
addIndexEntry()
Adds new index entry.
public
addIndexEntry(int $sectionId, int $elementId, int $facetId, int $value, float $valueNum, bool $includeSubsections) : bool
Parameters
- $sectionId : int
-
Identifier of the element section.
- $elementId : int
-
Identifier of the element.
- $facetId : int
-
Identifier of the property/price.
- $value : int
-
Dictionary value or 0.
- $valueNum : float
-
Value of an numeric property or price.
- $includeSubsections : bool
-
If section has parent or direct element connection.
Return values
boolcreate()
Creates new property values index for information block.
public
create() : void
You have to be sure that index does not exists.
deleteIndexElement()
Deletes all element entries from the index.
public
deleteIndexElement(int $elementId) : bool
Parameters
- $elementId : int
-
Identifier of the element to be deleted.
Return values
booldrop()
Deletes existing index from the database.
public
drop() : void
You have to check that index exists before calling this method.
facetIdToPriceId()
Converts internal storage facet identifier into catalog price identifier.
public
static facetIdToPriceId(int $facetId) : int
Parameters
- $facetId : int
-
Internal storage facet identifier.
Return values
intfacetIdToPropertyId()
Converts internal storage facet identifier into iblock property identifier.
public
static facetIdToPropertyId(int $facetId) : int
Parameters
- $facetId : int
-
Internal storage facet identifier.
Return values
intflushIndexEntries()
Writes all index entries from the queue to the database.
public
flushIndexEntries() : bool
Return values
boolgetIblockId()
Returns information block identifier.
public
getIblockId() : int
Return values
intgetLastStoredElementId()
Returns maximum stored element identifier.
public
getLastStoredElementId() : int
Return values
intgetTableName()
Internal method to get database table name for storing property index.
public
getTableName() : string
Return values
stringisExists()
Checks if property index exists in the database.
public
isExists() : bool
Returns true on success.
Return values
boolisPriceId()
Returns true if given identifier is catalog price one.
public
static isPriceId(int $facetId) : bool
Parameters
- $facetId : int
-
Internal storage facet identifier.
Return values
boolisPropertyId()
Returns true if given identifier is iblock property one.
public
static isPropertyId(int $facetId) : bool
Parameters
- $facetId : int
-
Internal storage facet identifier.
Return values
boolpriceIdToFacetId()
Converts catalog price identifier into internal storage facet identifier.
public
static priceIdToFacetId(int $priceId) : int
Parameters
- $priceId : int
-
Price identifier.
Return values
intpropertyIdToFacetId()
Converts iblock property identifier into internal storage facet identifier.
public
static propertyIdToFacetId(int $propertyId) : int
Parameters
- $propertyId : int
-
Property identifier.
Return values
intqueueIndexEntry()
Adds index entry to an queue for batch add.
public
queueIndexEntry(int $sectionId, int $elementId, int $facetId, int $value, float $valueNum, bool $includeSubsections) : bool
Parameters
- $sectionId : int
-
Identifier of the element section.
- $elementId : int
-
Identifier of the element.
- $facetId : int
-
Identifier of the property/price.
- $value : int
-
Dictionary value or 0.
- $valueNum : float
-
Value of an numeric property or price.
- $includeSubsections : bool
-
If section has parent or direct element connection.