PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
yatra / app / Core / Service.php

Service.php in Yatra – Travel Booking & Tour Operator Software trunk, at app/Core/Service.php

58 lines 944 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Yatra\Core;
6
7 /**
8 * Base Service Class
9 *
10 * Abstract base class for all Yatra services
11 * Provides common functionality and structure
12 *
13 * @package Yatra\Core
14 */
15 abstract class Service
16 {
17 /**
18 * Service constructor
19 */
20 public function __construct()
21 {
22 $this->init();
23 }
24
25 /**
26 * Initialize the service
27 * Override this method in child classes
28 *
29 * @return void
30 */
31 protected function init(): void
32 {
33 // Override in child classes
34 }
35
36 /**
37 * Get service name
38 * Override this method in child classes
39 *
40 * @return string
41 */
42 public function getName(): string
43 {
44 return static::class;
45 }
46
47 /**
48 * Check if service is active
49 * Override this method in child classes
50 *
51 * @return bool
52 */
53 public function isActive(): bool
54 {
55 return true;
56 }
57 }
58