StagingDatabaseDtoTrait.php
1 year ago
StagingNetworkDtoTrait.php
2 months ago
StagingOperationDtoTrait.php
2 weeks ago
StagingSiteGetterTrait.php
2 months ago
WithAdvanceStagingOptions.php
5 months ago
WithDataAdjustmentTasks.php
9 months ago
WithStagingDatabase.php
2 months ago
WithStagingEnginePreference.php
2 weeks ago
WithStagingRequirementLogs.php
2 weeks ago
WithStagingSiteDto.php
1 year ago
WithAdvanceStagingOptions.php
400 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Staging\Traits; |
| 4 | |
| 5 | trait WithAdvanceStagingOptions |
| 6 | { |
| 7 | /** @var bool */ |
| 8 | private $useNewAdminAccount = false; |
| 9 | |
| 10 | /** @var string */ |
| 11 | private $adminEmail = ''; |
| 12 | |
| 13 | /** @var string */ |
| 14 | private $adminPassword = ''; |
| 15 | |
| 16 | /** @var bool */ |
| 17 | private $useCustomDatabase = false; |
| 18 | |
| 19 | /** @var string */ |
| 20 | private $databaseServer = ''; |
| 21 | |
| 22 | /** @var string */ |
| 23 | private $databaseName = ''; |
| 24 | |
| 25 | /** @var string */ |
| 26 | private $databaseUser = ''; |
| 27 | |
| 28 | /** @var string */ |
| 29 | private $databasePassword = ''; |
| 30 | |
| 31 | /** @var string */ |
| 32 | private $databasePrefix = ''; |
| 33 | |
| 34 | /** @var bool */ |
| 35 | private $databaseSsl = false; |
| 36 | |
| 37 | /** @var string */ |
| 38 | private $customUrl = ''; |
| 39 | |
| 40 | /** @var string */ |
| 41 | private $customPath = ''; |
| 42 | |
| 43 | /** @var bool */ |
| 44 | private $isEmailsAllowed = true; |
| 45 | |
| 46 | /** @var bool */ |
| 47 | private $isUploadsSymlinked = false; |
| 48 | |
| 49 | /** @var bool */ |
| 50 | private $isCronEnabled = true; |
| 51 | |
| 52 | /** @var bool */ |
| 53 | private $isWooSchedulerEnabled = true; |
| 54 | |
| 55 | /** @var bool */ |
| 56 | private $isEmailsReminderEnabled = false; |
| 57 | |
| 58 | /** @var bool */ |
| 59 | private $isAutoUpdatePlugins = false; |
| 60 | |
| 61 | /** @var string[] */ |
| 62 | private $tmpExcludedFullPaths = []; |
| 63 | |
| 64 | /** @var string[] */ |
| 65 | private $tmpExcludedGoDaddyFiles = []; |
| 66 | |
| 67 | /** |
| 68 | * @param bool $useNewAdminAccount |
| 69 | * @return void |
| 70 | */ |
| 71 | public function setUseNewAdminAccount(bool $useNewAdminAccount) |
| 72 | { |
| 73 | $this->useNewAdminAccount = $useNewAdminAccount; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * @return bool |
| 78 | */ |
| 79 | public function getUseNewAdminAccount(): bool |
| 80 | { |
| 81 | return $this->useNewAdminAccount; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * @param string $adminEmail |
| 86 | * @return void |
| 87 | */ |
| 88 | public function setAdminEmail(string $adminEmail) |
| 89 | { |
| 90 | $this->adminEmail = $adminEmail; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * @return string |
| 95 | */ |
| 96 | public function getAdminEmail(): string |
| 97 | { |
| 98 | return $this->adminEmail; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * @param string $adminPassword |
| 103 | * @return void |
| 104 | */ |
| 105 | public function setAdminPassword(string $adminPassword) |
| 106 | { |
| 107 | $this->adminPassword = $adminPassword; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * @return string |
| 112 | */ |
| 113 | public function getAdminPassword(): string |
| 114 | { |
| 115 | return $this->adminPassword; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * @param bool $useCustomDatabase |
| 120 | * @return void |
| 121 | */ |
| 122 | public function setUseCustomDatabase(bool $useCustomDatabase) |
| 123 | { |
| 124 | $this->useCustomDatabase = $useCustomDatabase; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * @return bool |
| 129 | */ |
| 130 | public function getUseCustomDatabase(): bool |
| 131 | { |
| 132 | return $this->useCustomDatabase; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * @param string $databaseServer |
| 137 | * @return void |
| 138 | */ |
| 139 | public function setDatabaseServer(string $databaseServer) |
| 140 | { |
| 141 | $this->databaseServer = $databaseServer; |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * @return string |
| 146 | */ |
| 147 | public function getDatabaseServer(): string |
| 148 | { |
| 149 | return $this->databaseServer; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * @param string $databaseName |
| 154 | * @return void |
| 155 | */ |
| 156 | public function setDatabaseName(string $databaseName) |
| 157 | { |
| 158 | $this->databaseName = $databaseName; |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * @return string |
| 163 | */ |
| 164 | public function getDatabaseName(): string |
| 165 | { |
| 166 | return $this->databaseName; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * @param string $databaseUser |
| 171 | * @return void |
| 172 | */ |
| 173 | public function setDatabaseUser(string $databaseUser) |
| 174 | { |
| 175 | $this->databaseUser = $databaseUser; |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * @return string |
| 180 | */ |
| 181 | public function getDatabaseUser(): string |
| 182 | { |
| 183 | return $this->databaseUser; |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * @param string $databasePassword |
| 188 | * @return void |
| 189 | */ |
| 190 | public function setDatabasePassword(string $databasePassword) |
| 191 | { |
| 192 | $this->databasePassword = $databasePassword; |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * @return string |
| 197 | */ |
| 198 | public function getDatabasePassword(): string |
| 199 | { |
| 200 | return $this->databasePassword; |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * @param string $databasePrefix |
| 205 | * @return void |
| 206 | */ |
| 207 | public function setDatabasePrefix(string $databasePrefix) |
| 208 | { |
| 209 | $this->databasePrefix = $databasePrefix; |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * @return string |
| 214 | */ |
| 215 | public function getDatabasePrefix(): string |
| 216 | { |
| 217 | return $this->databasePrefix; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * @param bool $databaseSsl |
| 222 | * @return void |
| 223 | */ |
| 224 | public function setDatabaseSsl(bool $databaseSsl) |
| 225 | { |
| 226 | $this->databaseSsl = $databaseSsl; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * @return bool |
| 231 | */ |
| 232 | public function getDatabaseSsl(): bool |
| 233 | { |
| 234 | return $this->databaseSsl; |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * @param string $customUrl |
| 239 | * @return void |
| 240 | */ |
| 241 | public function setCustomUrl(string $customUrl) |
| 242 | { |
| 243 | $this->customUrl = $customUrl; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * @return string |
| 248 | */ |
| 249 | public function getCustomUrl(): string |
| 250 | { |
| 251 | return $this->customUrl; |
| 252 | } |
| 253 | |
| 254 | /** |
| 255 | * @param string $customPath |
| 256 | * @return void |
| 257 | */ |
| 258 | public function setCustomPath(string $customPath) |
| 259 | { |
| 260 | $this->customPath = $customPath; |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * @return string |
| 265 | */ |
| 266 | public function getCustomPath(): string |
| 267 | { |
| 268 | return $this->customPath; |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * @param bool $isEmailsAllowed |
| 273 | * @return void |
| 274 | */ |
| 275 | public function setIsEmailsAllowed(bool $isEmailsAllowed) |
| 276 | { |
| 277 | $this->isEmailsAllowed = $isEmailsAllowed; |
| 278 | } |
| 279 | |
| 280 | /** |
| 281 | * @return bool |
| 282 | */ |
| 283 | public function getIsEmailsAllowed(): bool |
| 284 | { |
| 285 | return $this->isEmailsAllowed; |
| 286 | } |
| 287 | |
| 288 | public function setIsUploadsSymlinked(bool $isUploadsSymlinked) |
| 289 | { |
| 290 | $this->isUploadsSymlinked = $isUploadsSymlinked; |
| 291 | } |
| 292 | |
| 293 | public function getIsUploadsSymlinked(): bool |
| 294 | { |
| 295 | return $this->isUploadsSymlinked; |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * @param bool $isCronEnabled |
| 300 | * @return void |
| 301 | */ |
| 302 | public function setIsCronEnabled(bool $isCronEnabled) |
| 303 | { |
| 304 | $this->isCronEnabled = $isCronEnabled; |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * @return bool |
| 309 | */ |
| 310 | public function getIsCronEnabled(): bool |
| 311 | { |
| 312 | return $this->isCronEnabled; |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * @param bool $isWooSchedulerEnabled |
| 317 | * @return void |
| 318 | */ |
| 319 | public function setIsWooSchedulerEnabled(bool $isWooSchedulerEnabled) |
| 320 | { |
| 321 | $this->isWooSchedulerEnabled = $isWooSchedulerEnabled; |
| 322 | } |
| 323 | |
| 324 | /** |
| 325 | * @return bool |
| 326 | */ |
| 327 | public function getIsWooSchedulerEnabled(): bool |
| 328 | { |
| 329 | return $this->isWooSchedulerEnabled; |
| 330 | } |
| 331 | |
| 332 | /** |
| 333 | * @param bool $isEmailsReminderEnabled |
| 334 | * @return void |
| 335 | */ |
| 336 | public function setIsEmailsReminderEnabled(bool $isEmailsReminderEnabled) |
| 337 | { |
| 338 | $this->isEmailsReminderEnabled = $isEmailsReminderEnabled; |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * @return bool |
| 343 | */ |
| 344 | public function getIsEmailsReminderEnabled(): bool |
| 345 | { |
| 346 | return $this->isEmailsReminderEnabled; |
| 347 | } |
| 348 | |
| 349 | /** |
| 350 | * @param bool $isAutoUpdatePlugins |
| 351 | * @return void |
| 352 | */ |
| 353 | public function setIsAutoUpdatePlugins(bool $isAutoUpdatePlugins) |
| 354 | { |
| 355 | $this->isAutoUpdatePlugins = $isAutoUpdatePlugins; |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * @return bool |
| 360 | */ |
| 361 | public function getIsAutoUpdatePlugins(): bool |
| 362 | { |
| 363 | return $this->isAutoUpdatePlugins; |
| 364 | } |
| 365 | |
| 366 | /** |
| 367 | * @param string[] $tmpExcludedFullPaths |
| 368 | * @return void |
| 369 | */ |
| 370 | public function setTmpExcludedFullPaths(array $tmpExcludedFullPaths) |
| 371 | { |
| 372 | $this->tmpExcludedFullPaths = $tmpExcludedFullPaths; |
| 373 | } |
| 374 | |
| 375 | /** |
| 376 | * @return string[] |
| 377 | */ |
| 378 | public function getTmpExcludedFullPaths(): array |
| 379 | { |
| 380 | return $this->tmpExcludedFullPaths; |
| 381 | } |
| 382 | |
| 383 | /** |
| 384 | * @param string[] $tmpExcludedGoDaddyFiles |
| 385 | * @return void |
| 386 | */ |
| 387 | public function setTmpExcludedGoDaddyFiles(array $tmpExcludedGoDaddyFiles) |
| 388 | { |
| 389 | $this->tmpExcludedGoDaddyFiles = $tmpExcludedGoDaddyFiles; |
| 390 | } |
| 391 | |
| 392 | /** |
| 393 | * @return string[] |
| 394 | */ |
| 395 | public function getTmpExcludedGoDaddyFiles(): array |
| 396 | { |
| 397 | return $this->tmpExcludedGoDaddyFiles; |
| 398 | } |
| 399 | } |
| 400 |