aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/annotations.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 22:37:30 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 22:37:30 +0000
commitca08eb6d170d375ef4fca53604956f3474c7db19 (patch)
treea1e96c6b0ae322fab93373a66e1951e2b3b9be48 /engine/lib/annotations.php
parentbe37104ac63cd25f2eac831ca03d6d2b19976e1c (diff)
downloadelgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.gz
elgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.bz2
Merged r6701:6756 from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6849 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r--engine/lib/annotations.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 0bb29c408..c960da014 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -18,7 +18,8 @@ require_once('extender.php');
/**
* ElggAnnotation
*
- * An annotation is similar to metadata each entity can contain more than one of each annotation.
+ * An annotation is similar to metadata.
+ * Each entity can have more than one of each type of annotation.
*
* @package Elgg
* @subpackage Core
@@ -27,7 +28,7 @@ require_once('extender.php');
class ElggAnnotation extends ElggExtender {
/**
- * Construct a new site object, optionally from a given id value or db row.
+ * Construct a new annotation, optionally from a given id value or db object.
*
* @param mixed $id
*/
@@ -87,14 +88,14 @@ class ElggAnnotation extends ElggExtender {
$this->value_type, $this->owner_guid, $this->access_id);
if (!$this->id) {
- throw new IOException(sprintf(elgg_new('IOException:UnableToSaveNew'), get_class()));
+ throw new IOException(sprintf(elgg_echo('IOException:UnableToSaveNew'), get_class()));
}
return $this->id;
}
}
/**
- * Delete a given site.
+ * Delete the annotation.
*/
function delete() {
return delete_annotation($this->id);
@@ -125,7 +126,7 @@ class ElggAnnotation extends ElggExtender {
* Convert a database row to a new ElggAnnotation
*
* @param stdClass $row
- * @return stdClass or ElggAnnotation
+ * @return ElggAnnotation
*/
function row_to_elggannotation($row) {
if (!($row instanceof stdClass)) {
@@ -139,6 +140,7 @@ function row_to_elggannotation($row) {
* Get a specific annotation.
*
* @param int $annotation_id
+ * @return ElggAnnotation
*/
function get_annotation($annotation_id) {
global $CONFIG;
@@ -158,6 +160,7 @@ function get_annotation($annotation_id) {
* @param string $value_type
* @param int $owner_guid
* @param int $access_id
+ * @return int|bool id on success or false on failure
*/
function create_annotation($entity_guid, $name, $value, $value_type, $owner_guid, $access_id = ACCESS_PRIVATE) {
global $CONFIG;
@@ -220,6 +223,7 @@ function create_annotation($entity_guid, $name, $value, $value_type, $owner_guid
* @param string $value_type
* @param int $owner_guid
* @param int $access_id
+ * @return bool
*/
function update_annotation($annotation_id, $name, $value, $value_type, $owner_guid, $access_id) {
global $CONFIG;