PluginProbe
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more / 0.2
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more v0.2
2.0.2 trunk 0.2 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 2.0.0 2.0.1
texty / includes / Api.php

Api.php in Texty – SMS Notification for WordPress, WooCommerce, Dokan and more 0.2, at includes/Api.php

44 lines 729 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Texty;
4
5 /**
6 * Manager Class
7 */
8 class Api {
9
10 /**
11 * All API Classes
12 *
13 * @var array
14 */
15 protected $classes;
16
17 /**
18 * Initialize
19 */
20 public function __construct() {
21 $this->classes = [
22 Api\Settings::class,
23 Api\Notifications::class,
24 Api\Tools::class,
25 Api\Status::class,
26 Api\Send::class,
27 ];
28
29 add_action( 'rest_api_init', [ $this, 'init_api' ] );
30 }
31
32 /**
33 * Register APIs
34 *
35 * @return void
36 */
37 public function init_api() {
38 foreach ( $this->classes as $class ) {
39 $object = new $class();
40 $object->register_routes();
41 }
42 }
43 }
44