KWeb  6.4
KWebSource_Sql_Registry Class Reference

Data is stored in a registry-like structure: every key=>value pair is stored in a separate row. More...

Inheritance diagram for KWebSource_Sql_Registry:
KWebSource_Sql KWebSource KWebSource_Sql_Keywords KWebSource_Sql_ObjectData

Public Member Functions

 __construct ($id, $group, $table=false)
 commitUpdates (KWebObject_Attributable $object, KWebAttribute_Table_Class $attributes)
 Commits remaining updates to the data source.
 commitArray (KWebObject_Attributable $object, KWebAttribute_Table_Class $attributes, $data)
 Stores data as an array.
 commitHashmap (KWebObject_Attributable $object, KWebAttribute_Table_Class $attributes, $data, $replace)
 Stores data as a hashmap.
 fetchDataForUids ($uids, $genre, KWebAttribute_Table_Class $attributes, $languages=false, $mainLanguage=false)
 Fetches data for specified object UIDs and languages.

Data Fields

 $keyName
 $keyValue
 $removeNull = false
 If TRUE, will remove null values from the database.

Detailed Description

Data is stored in a registry-like structure: every key=>value pair is stored in a separate row.


Constructor & Destructor Documentation

KWebSource_Sql_Registry::__construct ( id,
group,
table = false 
)

Reimplemented from KWebSource_Sql.


Member Function Documentation

KWebSource_Sql_Registry::commitArray ( KWebObject_Attributable object,
KWebAttribute_Table_Class attributes,
data 
)

Stores data as an array.

Parameters:
$dataarray( $lang => array(val, val...) )
KWebSource_Sql_Registry::commitHashmap ( KWebObject_Attributable object,
KWebAttribute_Table_Class attributes,
data,
replace 
)

Stores data as a hashmap.

KWebSource_Sql_Registry::commitUpdates ( KWebObject_Attributable object,
KWebAttribute_Table_Class attributes 
)

Commits remaining updates to the data source.

Returns:
boolean TRUE if any changes where found

Reimplemented from KWebSource.

KWebSource_Sql_Registry::fetchDataForUids ( uids,
genre,
KWebAttribute_Table_Class attributes,
languages = false,
mainLanguage = false 
)

Fetches data for specified object UIDs and languages.

Parameters:
$objectsArray of object UIDs, or IDs
$genreDefault genre for UIDs
$languagesArray of languages to fetch or false for every language
$mainLanguageMain language - results will be sorted, with the main language as the first one
Returns:
array results as [$genre][$objectId][$lang] => array(data)

Reimplemented from KWebSource.


Field Documentation

KWebSource_Sql_Registry::$keyName
KWebSource_Sql_Registry::$keyValue
KWebSource_Sql_Registry::$removeNull = false

If TRUE, will remove null values from the database.


The documentation for this class was generated from the following file: