Elgg
Version 1.9
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Activate a plugin or plugins. | |
Functions | |
elgg_get_metastring_id ($string, $case_sensitive=true) | |
Gets the metastring identifier for a value. More... | |
_elgg_add_metastring ($string) | |
Add a metastring. More... | |
_elgg_delete_orphaned_metastrings () | |
Delete any orphaned entries in metastrings. More... | |
_elgg_get_metastring_based_objects ($options) | |
Returns an array of either ElggAnnotation or ElggMetadata objects. More... | |
_elgg_get_metastring_sql ($table, $names=null, $values=null, $pairs=null, $ids=null, $case_sensitive=false) | |
Returns an array of joins and wheres for use in metastrings. More... | |
_elgg_normalize_metastrings_options (array $options=array()) | |
Normalizes metadata / annotation option names to their corresponding metastrings name. More... | |
_elgg_set_metastring_based_object_enabled_by_id ($id, $enabled, $type) | |
Enables or disables a metastrings-based object by its id. More... | |
_elgg_batch_metastring_based_objects (array $options, $callback, $inc_offset=true) | |
Runs metastrings-based objects found using $options through $callback. More... | |
_elgg_get_metastring_based_object_from_id ($id, $type) | |
Returns a singular metastring-based object by its ID. More... | |
_elgg_delete_metastring_based_object_by_id ($id, $type) | |
Deletes a metastring-based object by its id. More... | |
_elgg_entities_get_metastrings_options ($type, $options) | |
Returns options to pass to elgg_get_entities() for metastrings operations. More... | |
_elgg_metastrings_test ($hook, $type, $value) | |
Metastring unit tests. More... | |
Variables | |
global | $METASTRINGS_CACHE = array() |
_elgg_add_metastring | ( | $string | ) |
Add a metastring.
string | $string | The value to be normalized |
Definition at line 102 of file metastrings.php.
_elgg_batch_metastring_based_objects | ( | array | $options, |
$callback, | |||
$inc_offset = true |
|||
) |
Runs metastrings-based objects found using $options through $callback.
array | $options | An options array. _elgg_get_metastring_based_objects() |
string | $callback | The callback to pass each result through |
bool | $inc_offset | Increment the offset? Pass false for callbacks that delete / disable |
Definition at line 672 of file metastrings.php.
_elgg_delete_metastring_based_object_by_id | ( | $id, | |
$type | |||
) |
Deletes a metastring-based object by its id.
int | $id | The object's ID |
string | $type | The object's metastring type: annotation or metadata |
Definition at line 717 of file metastrings.php.
_elgg_delete_orphaned_metastrings | ( | ) |
Delete any orphaned entries in metastrings.
This is run by the garbage collector.
Definition at line 116 of file metastrings.php.
_elgg_entities_get_metastrings_options | ( | $type, | |
$options | |||
) |
Returns options to pass to elgg_get_entities() for metastrings operations.
string | $type | Metastring type: annotation or metadata |
array | $options | Options |
Definition at line 782 of file metastrings.php.
_elgg_get_metastring_based_object_from_id | ( | $id, | |
$type | |||
) |
Returns a singular metastring-based object by its ID.
int | $id | The metastring-based object's ID |
string | $type | The type: annotation or metadata |
Definition at line 689 of file metastrings.php.
_elgg_get_metastring_based_objects | ( | $options | ) |
Returns an array of either ElggAnnotation or ElggMetadata objects.
Accepts all elgg_get_entities() options for entity restraints.
array | $options | Array in format: metastring_names => null|ARR metastring names metastring_values => null|ARR metastring values metastring_ids => null|ARR metastring ids metastring_case_sensitive => BOOL Overall Case sensitive |
metastring_owner_guids => null|ARR Guids for metadata owners
metastring_created_time_lower => INT Lower limit for created time.
metastring_created_time_upper => INT Upper limit for created time.
metastring_calculation => STR Perform the MySQL function on the metastring values returned. This differs from egef_annotation_calculation in that it returns only the calculation of all annotation values. You can sum, avg, count, etc. egef_annotation_calculation() returns ElggEntities ordered by a calculation on their annotation values.
metastring_type => STR metadata or annotation(s)
Definition at line 190 of file metastrings.php.
_elgg_get_metastring_sql | ( | $table, | |
$names = null , |
|||
$values = null , |
|||
$pairs = null , |
|||
$ids = null , |
|||
$case_sensitive = false |
|||
) |
Returns an array of joins and wheres for use in metastrings.
string | $table | The annotation or metadata table name or alias |
array | $names | An array of names |
array | $values | An array of values |
array | $pairs | Name / value pairs. Not currently used. |
array | $ids | Metastring IDs |
bool | $case_sensitive | Should name and values be case sensitive? |
Definition at line 457 of file metastrings.php.
_elgg_metastrings_test | ( | $hook, | |
$type, | |||
$value | |||
) |
Metastring unit tests.
string | $hook | unit_test |
string | $type | system |
array | $value | Array of other tests |
Definition at line 843 of file metastrings.php.
_elgg_normalize_metastrings_options | ( | array | $options = array() | ) |
Normalizes metadata / annotation option names to their corresponding metastrings name.
array | $options | An options array |
Definition at line 562 of file metastrings.php.
_elgg_set_metastring_based_object_enabled_by_id | ( | $id, | |
$enabled, | |||
$type | |||
) |
Enables or disables a metastrings-based object by its id.
int | $id | The object's ID |
string | $enabled | Value to set to: yes or no |
string | $type | Metastring type: metadata or annotation |
InvalidParameterException | private |
Definition at line 615 of file metastrings.php.
elgg_get_metastring_id | ( | $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 34 of file metastrings.php.
$METASTRINGS_CACHE = array() |
Definition at line 15 of file metastrings.php.