| 1 |
<?php |
| 2 |
/** |
| 3 |
* Users collection file. |
| 4 |
* |
| 5 |
* @package Activitypub |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace Activitypub\Collection; |
| 9 |
|
| 10 |
/** |
| 11 |
* Users collection. |
| 12 |
* |
| 13 |
* @deprecated version 4.2.0 |
| 14 |
*/ |
| 15 |
class Users extends Actors { |
| 16 |
/** |
| 17 |
* Get the User by ID. |
| 18 |
* |
| 19 |
* @param int $user_id The User-ID. |
| 20 |
* |
| 21 |
* @return User|Blog|Application|WP_Error The User or WP_Error if user not found. |
| 22 |
*/ |
| 23 |
public static function get_by_id( $user_id ) { |
| 24 |
_deprecated_function( __METHOD__, '4.2.0', 'Activitypub\Collection\Actors::get_by_id' ); |
| 25 |
|
| 26 |
return parent::get_by_id( $user_id ); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* Get the User by username. |
| 31 |
* |
| 32 |
* @param string $username The User-Name. |
| 33 |
* |
| 34 |
* @return User|Blog|Application|WP_Error The User or WP_Error if user not found. |
| 35 |
*/ |
| 36 |
public static function get_by_username( $username ) { |
| 37 |
_deprecated_function( __METHOD__, '4.2.0', 'Activitypub\Collection\Actors::get_by_username' ); |
| 38 |
|
| 39 |
return parent::get_by_username( $username ); |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* Get the User by resource. |
| 44 |
* |
| 45 |
* @param string $uri The User-Resource. |
| 46 |
* |
| 47 |
* @return User|WP_Error The User or WP_Error if user not found. |
| 48 |
*/ |
| 49 |
public static function get_by_resource( $uri ) { |
| 50 |
_deprecated_function( __METHOD__, '4.2.0', 'Activitypub\Collection\Actors::get_by_resource' ); |
| 51 |
|
| 52 |
return parent::get_by_resource( $uri ); |
| 53 |
} |
| 54 |
|
| 55 |
/** |
| 56 |
* Get the User by resource. |
| 57 |
* |
| 58 |
* @param string $id The User-Resource. |
| 59 |
* |
| 60 |
* @return User|Blog|Application|WP_Error The User or WP_Error if user not found. |
| 61 |
*/ |
| 62 |
public static function get_by_various( $id ) { |
| 63 |
_deprecated_function( __METHOD__, '4.2.0', 'Activitypub\Collection\Actors::get_by_various' ); |
| 64 |
|
| 65 |
return parent::get_by_various( $id ); |
| 66 |
} |
| 67 |
|
| 68 |
/** |
| 69 |
* Get the User collection. |
| 70 |
* |
| 71 |
* @return array The User collection. |
| 72 |
*/ |
| 73 |
public static function get_collection() { |
| 74 |
_deprecated_function( __METHOD__, '4.2.0', 'Activitypub\Collection\Actors::get_collection' ); |
| 75 |
|
| 76 |
return parent::get_collection(); |
| 77 |
} |
| 78 |
} |
| 79 |
|