[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-messages/classes/ -> class-bp-messages-message.php (summary)

BuddyPress Messages Classes.

File Size: 300 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BP_Messages_Message:: (8 methods):
  __construct()
  populate()
  send()
  get_recipients()
  get_recipient_ids()
  get_last_sent_for_user()
  is_user_sender()
  get_message_sender()


Class: BP_Messages_Message  - X-Ref

Single message class.

__construct( $id = null )   X-Ref
Constructor.

param: int|null $id Optional. ID of the message.

populate( $id )   X-Ref
Set up data related to a specific message object.

param: int $id ID of the message.

send()   X-Ref
Send a message.

return: int|bool ID of the newly created message on success, false on failure.

get_recipients()   X-Ref
Get a list of recipients for a message.

return: object $value List of recipients for a message.

get_recipient_ids( $recipient_usernames )   X-Ref
Get list of recipient IDs from their usernames.

param: array $recipient_usernames Usernames of recipients.
return: bool|array $recipient_ids Array of Recepient IDs.

get_last_sent_for_user( $thread_id )   X-Ref
Get the ID of the message last sent by the logged-in user for a given thread.

param: int $thread_id ID of the thread.
return: int|null ID of the message if found, otherwise null.

is_user_sender( $user_id, $message_id )   X-Ref
Check whether a user is the sender of a message.

param: int $user_id ID of the user.
param: int $message_id ID of the message.
return: int|null Returns the ID of the message if the user is the

get_message_sender( $message_id )   X-Ref
Get the ID of the sender of a message.

param: int $message_id ID of the message.
return: int|null The ID of the sender if found, otherwise null.



Generated: Sun Dec 22 01:00:54 2024 Cross-referenced by PHPXref 0.7.1