aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-09 10:52:15 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-09 10:52:15 +0000
commitd81cca9ea7e1af0eb3a82f7a8015750b273bebb5 (patch)
treec8cdb53de958093f77456b5312bdb3ab79c27bd5 /engine
parent0181f2cbe5210a0c1ff7798596cf45632996a5c3 (diff)
downloadelgg-d81cca9ea7e1af0eb3a82f7a8015750b273bebb5.tar.gz
elgg-d81cca9ea7e1af0eb3a82f7a8015750b273bebb5.tar.bz2
Refs #2632 - cleaned up documentation on metadata
git-svn-id: http://code.elgg.org/elgg/trunk@7273 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/metadata.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 77267d8a2..af366f99a 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -1,7 +1,7 @@
<?php
/**
* Elgg metadata
- * Functions to manage object metadata.
+ * Functions to manage entity metadata.
*
* @package Elgg.Core
* @subpackage DataModel.Metadata
@@ -23,11 +23,11 @@ function row_to_elggmetadata($row) {
}
/**
- * Get a specific item of metadata.
+ * Get a specific metadata object.
*
- * @param int $id The item of metadata being retrieved.
+ * @param int $id The id of the metadata being retrieved.
*
- * @return mixed
+ * @return mixed False on failure or ElggMetadata
*/
function get_metadata($id) {
global $CONFIG;
@@ -51,7 +51,7 @@ function get_metadata($id) {
*
* @param int $entity_guid The entity GUID
* @param string $name The name of the metadata
- * @param string $value The value of the item (useful to remove a single item of a set)
+ * @param string $value The value of the metadata (useful to remove a single item of a set)
*
* @return bool Depending on success
*/
@@ -173,7 +173,7 @@ function create_metadata($entity_guid, $name, $value, $value_type, $owner_guid,
}
/**
- * Update an item of metadata.
+ * Update a specific piece of metadata.
*
* @param int $id Metadata id
* @param string $name Metadata name
@@ -285,9 +285,9 @@ $access_id = ACCESS_PRIVATE, $allow_multiple = false) {
}
/**
- * Delete an item of metadata, where the current user has access.
+ * Delete a piece of metadata, where the current user has access.
*
- * @param int $id The item of metadata to delete.
+ * @param int $id The id of metadata to delete.
*
* @return bool
*/
@@ -317,12 +317,12 @@ function delete_metadata($id) {
}
/**
- * Return the metadata values that match your query.
+ * Get metadata objects by name.
*
* @param int $entity_guid Entity GUID
* @param string $meta_name Metadata name
*
- * @return mixed either a value, an array of ElggMetadata or false.
+ * @return mixed Either an ElggMetadata object, an array of ElggMetadata or false.
*/
function get_metadata_byname($entity_guid, $meta_name) {
global $CONFIG;
@@ -1252,8 +1252,9 @@ function metadata_array_to_values($array) {
}
/**
- * Get the URL for this item of metadata, by default this
- * links to the export handler in the current view.
+ * Get the URL for this metadata
+ *
+ * By default this links to the export handler in the current view.
*
* @param int $id Metadata ID
*