PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.6.7
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.6.7
1.17.9 1.17.8 1.17.7 1.17.6 1.17.5 1.17.4 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.3.0 1.3.1 1.3.11 1.3.12 1.3.13 1.3.14 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 143 releases
erp / modules / accounting / api / class-controller-rest-api.php

class-controller-rest-api.php in ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce 1.6.7, at modules/accounting/api/class-controller-rest-api.php

57 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WeDevs\ERP\Accounting\API;
4
5 /**
6 * class REST_API Handler
7 */
8 class REST_API {
9 public function __construct() {
10 add_filter( 'erp_rest_api_controllers', [ $this, 'register_accounting_new_controllers' ] );
11 }
12
13 public function register_accounting_new_controllers( $controllers ) {
14 $this->include_controllers();
15
16 $controllers = array_merge(
17 $controllers,
18 [
19 '\WeDevs\ERP\Accounting\API\Customers_Controller',
20 '\WeDevs\ERP\Accounting\API\Vendors_Controller',
21 '\WeDevs\ERP\Accounting\API\Employees_Controller',
22 '\WeDevs\ERP\Accounting\API\Inventory_Products_Controller',
23 '\WeDevs\ERP\Accounting\API\Inventory_Product_Cats_Controller',
24 '\WeDevs\ERP\Accounting\API\Ledgers_Accounts_Controller',
25 '\WeDevs\ERP\Accounting\API\Opening_Balances_Controller',
26 '\WeDevs\ERP\Accounting\API\Closing_Balance_Controller',
27 '\WeDevs\ERP\Accounting\API\Invoices_Controller',
28 '\WeDevs\ERP\Accounting\API\Payments_Controller',
29 '\WeDevs\ERP\Accounting\API\Bills_Controller',
30 '\WeDevs\ERP\Accounting\API\Pay_Bills_Controller',
31 '\WeDevs\ERP\Accounting\API\Purchases_Controller',
32 '\WeDevs\ERP\Accounting\API\Pay_Purchases_Controller',
33 '\WeDevs\ERP\Accounting\API\Transactions_Controller',
34 '\WeDevs\ERP\Accounting\API\Tax_Rates_Controller',
35 '\WeDevs\ERP\Accounting\API\Bank_Accounts_Controller',
36 '\WeDevs\ERP\Accounting\API\Company_Controller',
37 '\WeDevs\ERP\Accounting\API\Currencies_Controller',
38 '\WeDevs\ERP\Accounting\API\Journals_Controller',
39 '\WeDevs\ERP\Accounting\API\Expenses_Controller',
40 '\WeDevs\ERP\Accounting\API\Tax_Agencies_Controller',
41 '\WeDevs\ERP\Accounting\API\Tax_Cats_Controller',
42 '\WeDevs\ERP\Accounting\API\Tax_Rate_Names_Controller',
43 '\WeDevs\ERP\Accounting\API\People_Controller',
44 '\WeDevs\ERP\Accounting\API\Reports_Controller',
45 ]
46 );
47
48 return $controllers;
49 }
50
51 public function include_controllers() {
52 foreach ( glob( ERP_ACCOUNTING_API . '/*.php' ) as $filename ) {
53 include_once $filename;
54 }
55 }
56 }
57