KWeb
6.4
|
Public Member Functions | |
__construct ($id, $group) | |
commitUpdates (KWebObject_Attributable $object, KWebAttribute_Table_Class $attributes) | |
Commits remaining updates to the data source. | |
fetchDataForUids ($uids, $genre, KWebAttribute_Table_Class $attributes, $languages=false, $mainLanguage=false) | |
Fetches data for specified object UIDs and languages. | |
getHash () | |
hasAttributesData ($object, KWebAttribute_Table_Class $attributes) | |
Returns TRUE if there is any data for this source in the attributes list. | |
hasSingleAttributeData () | |
Returns true, if the source of the data is a single attribute (like item_keyword) | |
onObjectSwitchId ($genre, $oldId, $newId) | |
Data Fields | |
const | GROUP_DATA = 'data' |
Sources kept in data. | |
const | GROUP_MAIN = 'main' |
Main data source - deciding about the data type and id (k_item, k_item_lang) | |
const | GROUP_TYPE = 'type' |
Data sources for specific object type (like k_i_art). | |
const | GROUP_EXTENDED = 'extended' |
Data sources extending main one (like object data) | |
const | GROUP_OPTIONAL = 'optional' |
Optioanl data sources (like keywords) | |
const | ID_TYPEDATA = 'DATA' |
$group | |
Source group. | |
$dataFormat = false | |
Format of the data handled by this source. | |
$id | |
Source Id. | |
$objectGenre | |
What object genre is served from this source, if there is no keyGenre. | |
$keyUid | |
Data key for object UID. | |
$keyId | |
Data key for object ID. | |
$keyGenre | |
Data key for object genre. | |
$keyLang | |
Data key for language. | |
$dataAttributes = false | |
Attributes that are the source/destination of the data. | |
Protected Member Functions | |
collectAttributesData (KWebObject_Attributable $object, KWebAttribute_Table_Class $attributes, &$data, $lang, $unsetNotTranslated=false) | |
Collects this source's data from attributes. | |
getKeys () | |
getKeyValues ($object, KWebAttribute_Table_Class $attributes, $lang=false, $newId=false) |
KWebSource::__construct | ( | $ | id, |
$ | group | ||
) |
Reimplemented in KWebSource_Sql_Keywords, and KWebSource_Sql_ObjectData.
KWebSource::collectAttributesData | ( | KWebObject_Attributable $ | object, |
KWebAttribute_Table_Class $ | attributes, | ||
&$ | data, | ||
$ | lang, | ||
$ | unsetNotTranslated = false |
||
) | [protected] |
Collects this source's data from attributes.
KWebSource::commitUpdates | ( | KWebObject_Attributable $ | object, |
KWebAttribute_Table_Class $ | attributes | ||
) | [abstract] |
Commits remaining updates to the data source.
Reimplemented in KWebSource_Sql_Record, KWebSource_Sql_Registry, and KWebSource_Data.
KWebSource::fetchDataForUids | ( | $ | uids, |
$ | genre, | ||
KWebAttribute_Table_Class $ | attributes, | ||
$ | languages = false , |
||
$ | mainLanguage = false |
||
) | [abstract] |
Fetches data for specified object UIDs and languages.
$objects | Array of object UIDs, or IDs |
$genre | Default genre for UIDs |
$languages | Array of languages to fetch or false for every language |
$mainLanguage | Main language - results will be sorted, with the main language as the first one |
Reimplemented in KWebSource_Sql_Registry, KWebSource_Sql_Record, and KWebSource_Data.
KWebSource::getHash | ( | ) |
Reimplemented in KWebSource_Sql.
KWebSource::getKeys | ( | ) | [protected] |
KWebSource::getKeyValues | ( | $ | object, |
KWebAttribute_Table_Class $ | attributes, | ||
$ | lang = false , |
||
$ | newId = false |
||
) | [protected] |
KWebSource::hasAttributesData | ( | $ | object, |
KWebAttribute_Table_Class $ | attributes | ||
) |
Returns TRUE if there is any data for this source in the attributes list.
KWebSource::hasSingleAttributeData | ( | ) |
Returns true, if the source of the data is a single attribute (like item_keyword)
KWebSource::onObjectSwitchId | ( | $ | genre, |
$ | oldId, | ||
$ | newId | ||
) |
Reimplemented in KWebSource_Sql.
KWebSource::$dataAttributes = false |
Attributes that are the source/destination of the data.
String - single attribute in a table. It's value will be the source... (not all sources will work with this!) FALSE/NULL - all attributes with $source the same as this source's id array() - all attributes with $source within the array
KWebSource::$dataFormat = false |
Format of the data handled by this source.
KWebSource::$group |
Source group.
KWebSource::$id |
Source Id.
KWebSource::$keyGenre |
Data key for object genre.
KWebSource::$keyId |
Data key for object ID.
KWebSource::$keyLang |
Data key for language.
KWebSource::$keyUid |
Data key for object UID.
KWebSource::$objectGenre |
What object genre is served from this source, if there is no keyGenre.
const KWebSource::GROUP_DATA = 'data' |
Sources kept in data.
They are commited first and read last
const KWebSource::GROUP_EXTENDED = 'extended' |
Data sources extending main one (like object data)
const KWebSource::GROUP_MAIN = 'main' |
Main data source - deciding about the data type and id (k_item, k_item_lang)
const KWebSource::GROUP_OPTIONAL = 'optional' |
Optioanl data sources (like keywords)
const KWebSource::GROUP_TYPE = 'type' |
Data sources for specific object type (like k_i_art).
Main type data source is usually identified with ID_TYPEDATA
const KWebSource::ID_TYPEDATA = 'DATA' |