Elgg  Version 1.11
Public Member Functions | List of all members
Elgg\Database\MetastringsTable Class Reference

Public Member Functions

 __construct (Pool $cache, Database $db)
 Constructor. More...
 getId ($string, $case_sensitive=true)
 Gets the metastring identifier for a value. More...
 add ($string)
 Add a metastring. More...
 getTableName ()
 The full name of the metastrings table, including prefix. More...

Detailed Description

Definition at line 21 of file MetastringsTable.php.

Constructor & Destructor Documentation

Elgg\Database\MetastringsTable::__construct ( Pool  $cache,
Database  $db 


Pool$cacheA cache for this table.
Database$dbThe database.

Definition at line 35 of file MetastringsTable.php.

Member Function Documentation

Elgg\Database\MetastringsTable::add (   $string)

Add a metastring.

You should not call this directly. Use elgg_get_metastring_id().
string$stringThe value to be normalized
int The identifier for this string

Definition at line 116 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$stringThe value
bool$case_sensitiveShould the retrieval be case sensitive? If not, there may be more than one result
int|array metastring id or array of ids

Definition at line 54 of file MetastringsTable.php.

Elgg\Database\MetastringsTable::getTableName ( )

The full name of the metastrings table, including prefix.


Definition at line 127 of file MetastringsTable.php.

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