PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.3
Booktics – Appointment Booking Calendar for Service Businesses v1.0.3
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 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.2 1.0.3 All 31 releases
booktics / trunk / base / providers / base-service-provider.php

base-service-provider.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.3, at trunk/base/providers/base-service-provider.php

53 lines 997 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Booktics\Providers;
4
5 use Booktics\Container\Container;
6
7 /**
8 * BaseServiceProvider will responsible for all appointment services
9 *
10 * @package Booktics/Providers
11 */
12 abstract class Base_Service_Provider {
13 /**
14 * Store container
15 *
16 * @var Container
17 */
18 protected Container $container;
19
20 /**
21 * Constructor for BaseServiceProvider class
22 *
23 * @return void
24 */
25 public function __construct() {
26 $this->container = booktics_container();
27 $this->register();
28 }
29
30 /**
31 * Register services
32 *
33 * @return void
34 */
35 public function register() {
36 $services = $this->get_services();
37
38 if ( $services ) {
39 foreach ( $services as $service ) {
40 $object = new $service();
41 $object->register();
42 }
43 }
44 }
45
46 /**
47 * Get services
48 *
49 * @return array service lists
50 */
51 abstract public function get_services();
52 }
53