PluginProbe
JetBackup – Backup, Restore & Migrate / 3.1.21.3
JetBackup – Backup, Restore & Migrate v3.1.21.3
3.1.23.6 3.1.23.5 3.1.23.3 3.1.22.4 3.1.22.3 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.8.1 1.4.9 1.5.0 1.5.1 1.5.1.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.10 All 82 releases
backup / src / JetBackup / Factory.php
Factory.php
112 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace JetBackup;
4
5 use JetBackup\Config\Config;
6 use JetBackup\Config\Locations;
7 use JetBackup\Settings\Automation;
8 use JetBackup\Settings\General;
9 use JetBackup\Settings\Integrations;
10 use JetBackup\Settings\Logging;
11 use JetBackup\Settings\Maintenance;
12 use JetBackup\Settings\Notifications;
13 use JetBackup\Settings\Performance;
14 use JetBackup\Settings\Restore;
15 use JetBackup\Settings\Security;
16 use JetBackup\Settings\Updates;
17 use JetBackup\Wordpress\Helper;
18
19 if (!defined( '__JETBACKUP__')) die('Direct access is not allowed');
20
21 class Factory {
22
23 private function __construct() {}
24
25 /**
26 * @return Config
27 */
28 public static function getConfig():Config {
29 static $i;
30 if(!$i) $i = new Config();
31 return $i;
32 }
33
34 public static function getSettingsAutomation():Automation {
35 static $i;
36 if(!$i) $i = new Automation();
37 return $i;
38 }
39
40 public static function getSettingsGeneral($reload=false):General {
41 static $i;
42 if(!$i || $reload) $i = new General();
43 return $i;
44 }
45
46 public static function getSettingsSecurity():Security {
47 static $i;
48 if(!$i) $i = new Security();
49 return $i;
50 }
51
52 public static function getSettingsPerformance():Performance {
53 static $i;
54 if(!$i) $i = new Performance();
55 return $i;
56 }
57
58 public static function getSettingsLogging():Logging {
59 static $i;
60 if(!$i) $i = new Logging();
61 return $i;
62 }
63
64 public static function getSettingsNotifications():Notifications {
65 static $i;
66 if(!$i) $i = new Notifications();
67 return $i;
68 }
69
70 public static function getSettingsMaintenance():Maintenance {
71 static $i;
72 if(!$i) $i = new Maintenance();
73 return $i;
74 }
75
76 public static function getSettingsUpdates():Updates {
77 static $i;
78 if(!$i) $i = new Updates();
79 return $i;
80 }
81
82 public static function getSettingsRestore():Restore {
83 static $i;
84 if(!$i) $i = new Restore();
85 return $i;
86 }
87
88 public static function getSettingsIntegrations():Integrations {
89 static $i;
90 if(!$i) $i = new Integrations();
91 return $i;
92 }
93
94 /**
95 * @return Locations
96 */
97 public static function getLocations():Locations {
98 static $i;
99 if(!$i) $i = new Locations();
100 return $i;
101 }
102
103 /**
104 * @return Helper
105 */
106 public static function getWPHelper():Helper {
107 static $i;
108 if(!$i) $i = new Helper();
109 return $i;
110 }
111 }
112