PluginProbe ʕ •ᴥ•ʔ
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin / 3.11.0
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin v3.11.0
4.9.0 0.9.6 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.6.0 1.6.2 1.7.0 1.7.1 1.8.0 1.8.1 1.9.0 2.0.0 2.0.1 2.1.1 2.2.1 2.3.1 2.4.0 2.5.0 2.5.1 2.6.0 2.7.0 2.8.0 2.9.0 3.0.1 3.0.2 3.0.3 3.1.0 3.10.0 3.11.0 3.11.1 3.2.0 3.2.1 3.3.0 3.4.0 3.5.0 3.5.1 3.5.2 3.6.1 3.7.0 3.8.0 3.8.2 3.9.0 4.0.1 4.1.0 4.1.1 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.8.0 trunk 0.10.0 0.10.1 0.11.1 0.11.2 0.3.1 0.3.2 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.5.2 0.6 0.7 0.8 0.8.2 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5
wp-mail-smtp / vendor / woocommerce / action-scheduler / classes / migration / Config.php
wp-mail-smtp / vendor / woocommerce / action-scheduler / classes / migration Last commit date
ActionMigrator.php 2 years ago ActionScheduler_DBStoreMigrator.php 2 years ago BatchFetcher.php 2 years ago Config.php 2 years ago Controller.php 2 years ago DryRun_ActionMigrator.php 2 years ago DryRun_LogMigrator.php 2 years ago LogMigrator.php 2 years ago Runner.php 2 years ago Scheduler.php 2 years ago
Config.php
169 lines
1 <?php
2
3
4 namespace Action_Scheduler\Migration;
5
6 use Action_Scheduler\WP_CLI\ProgressBar;
7 use ActionScheduler_Logger as Logger;
8 use ActionScheduler_Store as Store;
9
10 /**
11 * Class Config
12 *
13 * @package Action_Scheduler\Migration
14 *
15 * @since 3.0.0
16 *
17 * A config builder for the ActionScheduler\Migration\Runner class
18 */
19 class Config {
20 /** @var ActionScheduler_Store */
21 private $source_store;
22
23 /** @var ActionScheduler_Logger */
24 private $source_logger;
25
26 /** @var ActionScheduler_Store */
27 private $destination_store;
28
29 /** @var ActionScheduler_Logger */
30 private $destination_logger;
31
32 /** @var Progress bar */
33 private $progress_bar;
34
35 /** @var bool */
36 private $dry_run = false;
37
38 /**
39 * Config constructor.
40 */
41 public function __construct() {
42
43 }
44
45 /**
46 * Get the configured source store.
47 *
48 * @return ActionScheduler_Store
49 */
50 public function get_source_store() {
51 if ( empty( $this->source_store ) ) {
52 throw new \RuntimeException( __( 'Source store must be configured before running a migration', 'action-scheduler' ) );
53 }
54
55 return $this->source_store;
56 }
57
58 /**
59 * Set the configured source store.
60 *
61 * @param ActionScheduler_Store $store Source store object.
62 */
63 public function set_source_store( Store $store ) {
64 $this->source_store = $store;
65 }
66
67 /**
68 * Get the configured source loger.
69 *
70 * @return ActionScheduler_Logger
71 */
72 public function get_source_logger() {
73 if ( empty( $this->source_logger ) ) {
74 throw new \RuntimeException( __( 'Source logger must be configured before running a migration', 'action-scheduler' ) );
75 }
76
77 return $this->source_logger;
78 }
79
80 /**
81 * Set the configured source logger.
82 *
83 * @param ActionScheduler_Logger $logger
84 */
85 public function set_source_logger( Logger $logger ) {
86 $this->source_logger = $logger;
87 }
88
89 /**
90 * Get the configured destination store.
91 *
92 * @return ActionScheduler_Store
93 */
94 public function get_destination_store() {
95 if ( empty( $this->destination_store ) ) {
96 throw new \RuntimeException( __( 'Destination store must be configured before running a migration', 'action-scheduler' ) );
97 }
98
99 return $this->destination_store;
100 }
101
102 /**
103 * Set the configured destination store.
104 *
105 * @param ActionScheduler_Store $store
106 */
107 public function set_destination_store( Store $store ) {
108 $this->destination_store = $store;
109 }
110
111 /**
112 * Get the configured destination logger.
113 *
114 * @return ActionScheduler_Logger
115 */
116 public function get_destination_logger() {
117 if ( empty( $this->destination_logger ) ) {
118 throw new \RuntimeException( __( 'Destination logger must be configured before running a migration', 'action-scheduler' ) );
119 }
120
121 return $this->destination_logger;
122 }
123
124 /**
125 * Set the configured destination logger.
126 *
127 * @param ActionScheduler_Logger $logger
128 */
129 public function set_destination_logger( Logger $logger ) {
130 $this->destination_logger = $logger;
131 }
132
133 /**
134 * Get flag indicating whether it's a dry run.
135 *
136 * @return bool
137 */
138 public function get_dry_run() {
139 return $this->dry_run;
140 }
141
142 /**
143 * Set flag indicating whether it's a dry run.
144 *
145 * @param bool $dry_run
146 */
147 public function set_dry_run( $dry_run ) {
148 $this->dry_run = (bool) $dry_run;
149 }
150
151 /**
152 * Get progress bar object.
153 *
154 * @return ActionScheduler\WPCLI\ProgressBar
155 */
156 public function get_progress_bar() {
157 return $this->progress_bar;
158 }
159
160 /**
161 * Set progress bar object.
162 *
163 * @param ActionScheduler\WPCLI\ProgressBar $progress_bar
164 */
165 public function set_progress_bar( ProgressBar $progress_bar ) {
166 $this->progress_bar = $progress_bar;
167 }
168 }
169