| 1 | <?php |
||
| 17 | class WPInv_API { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string A prefix for our REST routes |
||
| 21 | */ |
||
| 22 | public $api_namespace = ''; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param WPInv_REST_Invoice_Controller Invoices controller |
||
| 26 | */ |
||
| 27 | public $invoices_controller; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Class constructor. |
||
| 31 | * |
||
| 32 | * @since 1.0.13 |
||
| 33 | * Sets the API namespace and inits hooks |
||
| 34 | */ |
||
| 35 | public function __construct( $api_namespace = 'invoicing/v1' ) { |
||
| 47 | |||
| 48 | |||
| 49 | /** |
||
| 50 | * Registers routes |
||
| 51 | * |
||
| 52 | * @since 1.0.13 |
||
| 53 | */ |
||
| 54 | public function register_rest_routes() { |
||
| 60 | |||
| 61 | |||
| 62 | /** |
||
| 63 | * Loads API files and controllers |
||
| 64 | * |
||
| 65 | * @return void |
||
| 66 | */ |
||
| 67 | protected function includes() { |
||
| 73 | |||
| 74 | |||
| 75 | } |