Elgg
Version 2.3
|
Public Member Functions | |
__construct (Pool $cache, Database $db) | |
Constructor. More... | |
getId ($string, $case_sensitive=true) | |
Gets the metastring identifier for a value. More... | |
getMap (array $string_keys) | |
Get a map of strings to their metastring identifiers (case sensitive matches) More... | |
add ($string) | |
Add a metastring. More... | |
getTableName () | |
The full name of the metastrings table, including prefix. More... | |
Protected Attributes | |
$cache | |
$db | |
Definition at line 21 of file MetastringsTable.php.
Constructor.
Pool | $cache | A cache for this table. |
Database | $db | The database. |
Definition at line 35 of file MetastringsTable.php.
Elgg\Database\MetastringsTable::add | ( | $string | ) |
Add a metastring.
string | $string | The value to be normalized |
Definition at line 176 of file MetastringsTable.php.
Elgg\Database\MetastringsTable::getId | ( | $string, | |
$case_sensitive = true |
|||
) |
Gets the metastring identifier for a value.
Elgg normalizes the names and values of annotations and metadata. This function provides the identifier used as the index in the metastrings table. Plugin developers should only use this if denormalizing names/values for performance reasons (to avoid multiple joins on the metastrings table).
string | $string | The value |
bool | $case_sensitive | Should the retrieval be case sensitive? If not, there may be more than one result |
Definition at line 56 of file MetastringsTable.php.
Elgg\Database\MetastringsTable::getMap | ( | array | $string_keys | ) |
Get a map of strings to their metastring identifiers (case sensitive matches)
string[] | $string_keys Strings to look up |
Definition at line 73 of file MetastringsTable.php.
Elgg\Database\MetastringsTable::getTableName | ( | ) |
The full name of the metastrings table, including prefix.
Definition at line 189 of file MetastringsTable.php.
|
protected |
Definition at line 24 of file MetastringsTable.php.
|
protected |
Definition at line 27 of file MetastringsTable.php.