PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.64
Timetics – Appointment Booking Calendar & Scheduling v1.0.64
1.0.64 1.0.62 1.0.63 1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 65 releases
timetics / vendor / themewinter / email-notification-sdk / src / Core / SDK.php

SDK.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.64, at vendor/themewinter/email-notification-sdk/src/Core/SDK.php

67 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Ens\Core;
3
4 use Ens\Assets\Enqueue;
5 use Ens\Flow\FlowAPI;
6 use Ens\Flow\FlowCPT;
7 use Ens\Hook\ActionListener;
8 use Ens\Whatsapp\MetaCloudProvider;
9 use Ens\Whatsapp\TemplatesAPI;
10
11 /**
12 * Class SDK
13 *
14 * @package Ens
15 *
16 * @since 1.0.0
17 */
18 class SDK {
19
20 /**
21 * @var SDK|null
22 */
23 protected static $instance = null;
24
25 public $identifier;
26
27 public static function get_instance() {
28 self::$instance = new self();
29
30 return self::$instance;
31 }
32
33 /**
34 * Pass config data before init.
35 *
36 * @since 1.0.0
37 *
38 * @param array $config
39 *
40 * @return SDK
41 */
42 public function setup( $config ) {
43 if(isset($config['general_prefix'])){
44 $this->identifier = $config['general_prefix'];
45 update_option( $this->identifier.'_ens_config', $config );
46 }
47
48 return $this;
49 }
50
51 /**
52 * Initialize SDK.
53 *
54 * @since 1.0.0
55 *
56 * @return void
57 */
58 public function init() {
59 ( new FlowCPT() )->register($this->identifier);
60 ( new FlowAPI() )->init($this->identifier);
61 ( new ActionListener() )->register($this->identifier);
62 ( new Enqueue() )->init($this->identifier);
63 // Added for adding whatsapp support
64 ( new MetaCloudProvider( $this->identifier ) )->register();
65 ( new TemplatesAPI() )->init( $this->identifier );
66 }
67 }