[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * BP REST Controllers' mocks 4 */ 5 6 class BP_REST_Mock_Class { 7 public function __construct() {} 8 9 public function register_routes( $controller = '' ) { 10 array_push( buddypress()->unit_test_rest->controllers, $controller ); 11 } 12 } 13 14 /** 15 * BP Member Cover Image REST Controller's mock. 16 */ 17 class BP_REST_Attachments_Member_Cover_Endpoint extends BP_REST_Mock_Class { 18 public function __construct() { 19 $this->namespace = bp_rest_namespace() . '/' . bp_rest_version(); 20 $this->rest_base = 'members'; 21 } 22 23 public function register_routes( $controller = '' ) { 24 parent::register_routes( 'BP_REST_Attachments_Member_Cover_Endpoint' ); 25 } 26 } 27 28 /** 29 * BP Member Avatar REST Controller's mock. 30 */ 31 class BP_REST_Attachments_Member_Avatar_Endpoint extends BP_REST_Mock_Class { 32 public function __construct() { 33 $this->namespace = bp_rest_namespace() . '/' . bp_rest_version(); 34 $this->rest_base = 'members'; 35 } 36 37 public function register_routes( $controller = '' ) { 38 parent::register_routes( 'BP_REST_Attachments_Member_Avatar_Endpoint' ); 39 } 40 } 41 42 /** 43 * BP Components REST Controller's mock. 44 */ 45 class BP_REST_Components_Endpoint extends BP_REST_Mock_Class { 46 public function __construct() { 47 $this->namespace = bp_rest_namespace() . '/' . bp_rest_version(); 48 $this->rest_base = 'components'; 49 } 50 51 public function register_routes( $controller = '' ) { 52 parent::register_routes( 'BP_REST_Components_Endpoint' ); 53 } 54 } 55 56 /** 57 * BP Members REST Controller's mock. 58 */ 59 class BP_REST_Members_Endpoint extends BP_REST_Mock_Class { 60 public function __construct() { 61 $this->namespace = bp_rest_namespace() . '/' . bp_rest_version(); 62 $this->rest_base = 'members'; 63 } 64 65 public function register_routes( $controller = '' ) { 66 parent::register_routes( 'BP_REST_Members_Endpoint' ); 67 } 68 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Apr 26 01:01:11 2024 | Cross-referenced by PHPXref 0.7.1 |