]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2632 - cleaned up documentation on metadata
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Nov 2010 10:52:15 +0000 (10:52 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Nov 2010 10:52:15 +0000 (10:52 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7273 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/metadata.php

index 77267d8a2d373d7d7e2f6b5bd48dfacdb64e752e..af366f99a34fb7a8d7115054d3a4a4e414981a73 100644 (file)
@@ -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
  *