| 1 |
<?php |
| 2 |
|
| 3 |
namespace Better_Payment\Lite; |
| 4 |
|
| 5 |
use Better_Payment\Lite\API\AdminAPI; |
| 6 |
use Better_Payment\Lite\API\UserAPI; |
| 7 |
|
| 8 |
/** |
| 9 |
* Exit if accessed directly |
| 10 |
*/ |
| 11 |
if (!defined('ABSPATH')) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* API Class |
| 17 |
* |
| 18 |
* @since 0.0.1 |
| 19 |
*/ |
| 20 |
class API extends Controller { |
| 21 |
|
| 22 |
/** |
| 23 |
* Initialize the class |
| 24 |
* |
| 25 |
* @since 0.0.1 |
| 26 |
*/ |
| 27 |
public function __construct() { |
| 28 |
add_action( 'rest_api_init', [ $this, 'register_api' ] ); |
| 29 |
|
| 30 |
new AdminAPI(); |
| 31 |
new UserAPI(); |
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* Register the API |
| 36 |
* |
| 37 |
* @return void |
| 38 |
* @since 0.0.1 |
| 39 |
*/ |
| 40 |
public function register_api() { |
| 41 |
// |
| 42 |
} |
| 43 |
} |
| 44 |
|