Friend
in package
implements
FriendContract
Class Friend.
Table of Contents
Interfaces
Constants
- FRIENDSHIP_CAN_ADD_FRIEND = 0
- FRIENDSHIP_CAN_NOT_ADD_FRIEND = 4
- FRIENDSHIP_CONFIRM_AWAIT = 2
- FRIENDSHIP_IS_DENY_REQUEST = 7
- FRIENDSHIP_IS_FRIEND = 1
- FRIENDSHIP_IS_OWNER = 5
- FRIENDSHIP_IS_UNKNOWN = 6
- FRIENDSHIP_REQUEST_SENT = 3
- SHARED_TYPE = 'friend'
Properties
- $friendRepository : FriendRepositoryInterface
- $requestRepository : FriendRequestRepositoryInterface
- $userRepository : UserRepositoryInterface
Methods
- __construct() : mixed
- getFriendIds() : array<string|int, int>
- getFriendship() : int
- getUsersForMention() : Collection
- isFriend() : bool
Constants
FRIENDSHIP_CAN_ADD_FRIEND
public
mixed
FRIENDSHIP_CAN_ADD_FRIEND
= 0
FRIENDSHIP_CAN_NOT_ADD_FRIEND
public
mixed
FRIENDSHIP_CAN_NOT_ADD_FRIEND
= 4
FRIENDSHIP_CONFIRM_AWAIT
public
mixed
FRIENDSHIP_CONFIRM_AWAIT
= 2
FRIENDSHIP_IS_DENY_REQUEST
public
mixed
FRIENDSHIP_IS_DENY_REQUEST
= 7
FRIENDSHIP_IS_FRIEND
public
mixed
FRIENDSHIP_IS_FRIEND
= 1
FRIENDSHIP_IS_OWNER
public
mixed
FRIENDSHIP_IS_OWNER
= 5
FRIENDSHIP_IS_UNKNOWN
public
mixed
FRIENDSHIP_IS_UNKNOWN
= 6
FRIENDSHIP_REQUEST_SENT
public
mixed
FRIENDSHIP_REQUEST_SENT
= 3
SHARED_TYPE
public
mixed
SHARED_TYPE
= 'friend'
Properties
$friendRepository
protected
FriendRepositoryInterface
$friendRepository
$requestRepository
protected
FriendRequestRepositoryInterface
$requestRepository
$userRepository
protected
UserRepositoryInterface
$userRepository
Methods
__construct()
public
__construct(FriendRepositoryInterface $friendRepository, FriendRequestRepositoryInterface $requestRepository, UserRepositoryInterface $userRepository) : mixed
Parameters
- $friendRepository : FriendRepositoryInterface
- $requestRepository : FriendRequestRepositoryInterface
- $userRepository : UserRepositoryInterface
getFriendIds()
public
getFriendIds(int $userId) : array<string|int, int>
Parameters
- $userId : int
Return values
array<string|int, int>getFriendship()
public
getFriendship(User $context, User $user) : int
Parameters
Return values
intgetUsersForMention()
public
getUsersForMention(array<string|int, mixed> $ids) : Collection
Parameters
- $ids : array<string|int, mixed>
Return values
CollectionisFriend()
public
isFriend(User $user, User $owner) : bool