- Timestamp:
- 02/13/2016 07:32:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/classes/class-bp-friends-friendship.php
r10424 r10587 13 13 /** 14 14 * BuddyPress Friendship object. 15 * 16 * @since 1.0.0 15 17 */ 16 18 class BP_Friends_Friendship { … … 19 21 * ID of the friendship. 20 22 * 23 * @since 1.0.0 21 24 * @var int 22 25 */ … … 26 29 * User ID of the friendship initiator. 27 30 * 31 * @since 1.0.0 28 32 * @var int 29 33 */ … … 33 37 * User ID of the 'friend' - the one invited to the friendship. 34 38 * 39 * @since 1.0.0 35 40 * @var int 36 41 */ … … 40 45 * Has the friendship been confirmed/accepted? 41 46 * 47 * @since 1.0.0 42 48 * @var int 43 49 */ … … 49 55 * Not currently used by BuddyPress. 50 56 * 57 * @since 1.0.0 51 58 * @var int 52 59 */ … … 56 63 * Date the friendship was created. 57 64 * 65 * @since 1.0.0 58 66 * @var string 59 67 */ … … 65 73 * Not currently used in BuddyPress. 66 74 * 75 * @since 1.0.0 67 76 * @var bool 68 77 */ … … 72 81 * Should additional friend details be queried? 73 82 * 83 * @since 1.0.0 74 84 * @var bool 75 85 */ … … 79 89 * Details about the friend. 80 90 * 91 * @since 1.0.0 81 92 * @var BP_Core_User 82 93 */ … … 85 96 /** 86 97 * Constructor method. 98 * 99 * @since 1.5.0 87 100 * 88 101 * @param int|null $id Optional. The ID of an existing friendship. … … 102 115 /** 103 116 * Set up data about the current friendship. 117 * 118 * @since 1.0.0 104 119 */ 105 120 public function populate() { … … 127 142 /** 128 143 * Save the current friendship to the database. 144 * 145 * @since 1.0.0 129 146 * 130 147 * @return bool True on success, false on failure. … … 175 192 * Delete the current friendship from the database. 176 193 * 194 * @since 1.0.0 195 * 177 196 * @return bool|int 178 197 */ … … 189 208 /** 190 209 * Get the IDs of a given user's friends. 210 * 211 * @since 1.0.0 191 212 * 192 213 * @param int $user_id ID of the user whose friends are being retrieved. … … 227 248 * Get the ID of the friendship object, if any, between a pair of users. 228 249 * 250 * @since 1.0.0 251 * 229 252 * @param int $user_id The ID of the first user. 230 253 * @param int $friend_id The ID of the second user. … … 242 265 * Get a list of IDs of users who have requested friendship of a given user. 243 266 * 267 * @since 1.2.0 268 * 244 269 * @param int $user_id The ID of the user who has received the 245 270 * friendship requests. … … 264 289 /** 265 290 * Get a total friend count for a given user. 291 * 292 * @since 1.0.0 266 293 * 267 294 * @param int $user_id Optional. ID of the user whose friendships you … … 296 323 /** 297 324 * Search the friends of a user by a search string. 325 * 326 * @since 1.0.0 298 327 * 299 328 * @param string $filter The search string, matched against xprofile … … 303 332 * @param int|null $page Optional. The page of results to return. Default: 304 333 * null (no pagination - return all results). 305 *306 334 * @return array|bool On success, an array: { 307 335 * @type array $friends IDs of friends returned by the query. … … 364 392 * while 'awaiting_response' is the other way around ($possible_friend_userid 365 393 * sent the initial request). 394 * 395 * @since 1.0.0 366 396 * 367 397 * @param int $initiator_userid The ID of the user who is the initiator … … 401 431 * @todo Why is this in the Friends component? 402 432 * 433 * @since 1.0.0 434 * 403 435 * @param array $user_ids IDs of users whose last_active meta is 404 436 * being queried. … … 434 466 * Mark a friendship as accepted. 435 467 * 468 * @since 1.0.0 469 * 436 470 * @param int $friendship_id ID of the friendship to be accepted. 437 471 * @return int Number of database rows updated. … … 448 482 * Remove a friendship or a friendship request INITIATED BY the logged-in user. 449 483 * 484 * @since 1.6.0 485 * 450 486 * @param int $friendship_id ID of the friendship to be withdrawn. 451 487 * @return int Number of database rows deleted. … … 462 498 * Remove a friendship or a friendship request MADE OF the logged-in user. 463 499 * 500 * @since 1.0.0 501 * 464 502 * @param int $friendship_id ID of the friendship to be rejected. 465 503 * @return int Number of database rows deleted. … … 477 515 * 478 516 * @todo Why does this exist, and why is it in bp-friends? 517 * 518 * @since 1.0.0 479 519 * 480 520 * @param string $filter String to search by. … … 521 561 * @todo Why does this exist, and why is it in bp-friends? 522 562 * 563 * @since 1.0.0 564 * 523 565 * @param string $filter Search term. 524 566 * @return int Count of users matching the search term. … … 556 598 * @todo Why does this exist, and why is it in bp-friends? 557 599 * 600 * @since 1.0.0 601 * 558 602 * @param array $user_ids Array of user IDs. 559 603 * @return array User IDs, sorted by the associated display names. … … 574 618 /** 575 619 * Get a list of random friend IDs. 620 * 621 * @since 1.0.0 576 622 * 577 623 * @param int $user_id ID of the user whose friends are being retrieved. … … 609 655 * - users who have been banned from the group 610 656 * 657 * @since 1.0.0 658 * 611 659 * @param int $user_id ID of the user whose friends are being counted. 612 660 * @param int $group_id ID of the group friends are being invited to. … … 643 691 * Get the friend user IDs for a given friendship. 644 692 * 693 * @since 1.0.0 694 * 645 695 * @param int $friendship_id ID of the friendship. 646 696 * @return object friend_user_id and initiator_user_id. … … 656 706 /** 657 707 * Delete all friendships and friend notifications related to a user. 708 * 709 * @since 1.0.0 658 710 * 659 711 * @param int $user_id ID of the user being expunged.
Note: See TracChangeset
for help on using the changeset viewer.