aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/Friendable.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-28 19:17:36 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-28 19:17:36 +0000
commit7ddd9521b3f3a397da3b0a6b56238d31414eb4be (patch)
tree6eb6a9a51db5fa0f5d3cc2ec6de29b9e258b12a1 /engine/classes/Friendable.php
parentbd3484417d170e62bc94e9db81d4ad37e8ddee6a (diff)
downloadelgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.gz
elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.bz2
Standardized code in all of core, not including language files, tests, or core mods.
git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/Friendable.php')
-rw-r--r--engine/classes/Friendable.php39
1 files changed, 30 insertions, 9 deletions
diff --git a/engine/classes/Friendable.php b/engine/classes/Friendable.php
index d400bd092..588f9ec5a 100644
--- a/engine/classes/Friendable.php
+++ b/engine/classes/Friendable.php
@@ -2,12 +2,16 @@
/**
* An interface for objects that behave as elements within a social network that have a profile.
*
+ * @package Elgg.Core
+ * @subpackage SocialModel.Friendable
*/
interface Friendable {
/**
* Adds a user as a friend
*
* @param int $friend_guid The GUID of the user to add
+ *
+ * @return bool
*/
public function addFriend($friend_guid);
@@ -15,12 +19,15 @@ interface Friendable {
* Removes a user as a friend
*
* @param int $friend_guid The GUID of the user to remove
+ *
+ * @return bool
*/
public function removeFriend($friend_guid);
/**
* Determines whether or not the current user is a friend of this entity
*
+ * @return bool
*/
public function isFriend();
@@ -28,6 +35,8 @@ interface Friendable {
* Determines whether or not this entity is friends with a particular entity
*
* @param int $user_guid The GUID of the entity this entity may or may not be friends with
+ *
+ * @return bool
*/
public function isFriendsWith($user_guid);
@@ -35,6 +44,8 @@ interface Friendable {
* Determines whether or not a foreign entity has made this one a friend
*
* @param int $user_guid The GUID of the foreign entity
+ *
+ * @return bool
*/
public function isFriendOf($user_guid);
@@ -42,8 +53,10 @@ interface Friendable {
* Returns this entity's friends
*
* @param string $subtype The subtype of entity to return
- * @param int $limit The number of entities to return
- * @param int $offset Indexing offset
+ * @param int $limit The number of entities to return
+ * @param int $offset Indexing offset
+ *
+ * @return array|false
*/
public function getFriends($subtype = "", $limit = 10, $offset = 0);
@@ -51,8 +64,10 @@ interface Friendable {
* Returns entities that have made this entity a friend
*
* @param string $subtype The subtype of entity to return
- * @param int $limit The number of entities to return
- * @param int $offset Indexing offset
+ * @param int $limit The number of entities to return
+ * @param int $offset Indexing offset
+ *
+ * @return array|false
*/
public function getFriendsOf($subtype = "", $limit = 10, $offset = 0);
@@ -60,17 +75,21 @@ interface Friendable {
* Returns objects in this entity's container
*
* @param string $subtype The subtype of entity to return
- * @param int $limit The number of entities to return
- * @param int $offset Indexing offset
+ * @param int $limit The number of entities to return
+ * @param int $offset Indexing offset
+ *
+ * @return array|false
*/
- public function getObjects($subtype="", $limit = 10, $offset = 0);
+ public function getObjects($subtype = "", $limit = 10, $offset = 0);
/**
* Returns objects in the containers of this entity's friends
*
* @param string $subtype The subtype of entity to return
- * @param int $limit The number of entities to return
- * @param int $offset Indexing offset
+ * @param int $limit The number of entities to return
+ * @param int $offset Indexing offset
+ *
+ * @return array|false
*/
public function getFriendsObjects($subtype = "", $limit = 10, $offset = 0);
@@ -78,6 +97,8 @@ interface Friendable {
* Returns the number of object entities in this entity's container
*
* @param string $subtype The subtype of entity to count
+ *
+ * @return int
*/
public function countObjects($subtype = "");
} \ No newline at end of file