PHP 인터페이스 Friendable, Elgg

파일 보기 프로젝트 열기: elgg/elgg

공개 메소드들

메소드 설명
addFriend ( integer $friend_guid ) : boolean Adds a user as a friend
getFriends ( array $options = [] ) : array | false Gets this entity's friends
getFriendsObjects ( array $options = [] ) : array | false Get an array of \ElggObjects owned by this entity's friends.
getFriendsOf ( array $options = [] ) : array | false Gets users who have made this entity a friend
getObjects ( array $options = [] ) : array | false Get an array of \ElggObject owned by this entity.
isFriend ( ) : boolean Determines whether or not the current user is a friend of this entity
isFriendOf ( integer $user_guid ) : boolean Determines whether or not a foreign entity has made this one a friend
isFriendsWith ( integer $user_guid ) : boolean Determines whether or not this entity is friends with a particular entity
removeFriend ( integer $friend_guid ) : boolean Removes a user as a friend

메소드 상세

addFriend() 공개 메소드

Adds a user as a friend
public addFriend ( integer $friend_guid ) : boolean
$friend_guid integer The GUID of the user to add
리턴 boolean

getFriends() 공개 메소드

Gets this entity's friends
public getFriends ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() for a list of options. 'relationship_guid' is set to this entity, relationship name to 'friend' and type to 'user'.
리턴 array | false Array of \ElggUser, or false, depending on success

getFriendsObjects() 공개 메소드

Get an array of \ElggObjects owned by this entity's friends.
public getFriendsObjects ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() for a list of options. 'relationship_guid' is set to this entity, type to 'object', relationship name to 'friend' and relationship_join_on to 'container_guid'.
리턴 array | false

getFriendsOf() 공개 메소드

Gets users who have made this entity a friend
public getFriendsOf ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() for a list of options. 'relationship_guid' is set to this entity, relationship name to 'friend', type to 'user' and inverse_relationship to true.
리턴 array | false Array of \ElggUser, or false, depending on success

getObjects() 공개 메소드

Get an array of \ElggObject owned by this entity.
public getObjects ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities() for a list of options. 'type' is set to object and owner_guid to this entity.
리턴 array | false

isFriend() 공개 메소드

Determines whether or not the current user is a friend of this entity
public isFriend ( ) : boolean
리턴 boolean

isFriendOf() 공개 메소드

Determines whether or not a foreign entity has made this one a friend
public isFriendOf ( integer $user_guid ) : boolean
$user_guid integer The GUID of the foreign entity
리턴 boolean

isFriendsWith() 공개 메소드

Determines whether or not this entity is friends with a particular entity
public isFriendsWith ( integer $user_guid ) : boolean
$user_guid integer The GUID of the entity this entity may or may not be friends with
리턴 boolean

removeFriend() 공개 메소드

Removes a user as a friend
public removeFriend ( integer $friend_guid ) : boolean
$friend_guid integer The GUID of the user to remove
리턴 boolean