[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress Messages Classes.

File Size: 281 lines (8 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.

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

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.

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

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

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

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

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



Generated: Fri Dec 13 01:01:36 2019 Cross-referenced by PHPXref 0.7.1