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
StagingNetworkDtoTrait.php
99 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Staging\Traits; |
| 4 | |
| 5 | /** |
| 6 | * Trait StagingNetworkDtoTrait |
| 7 | * This trait is has properties related to network staging site |
| 8 | */ |
| 9 | trait StagingNetworkDtoTrait |
| 10 | { |
| 11 | /** @var bool */ |
| 12 | private $isStagingNetwork = false; |
| 13 | |
| 14 | /** |
| 15 | * @var string |
| 16 | */ |
| 17 | private $stagingNetworkDomain = ''; |
| 18 | |
| 19 | /** |
| 20 | * @var string |
| 21 | */ |
| 22 | private $stagingNetworkPath = ''; |
| 23 | |
| 24 | /** |
| 25 | * The blog ID from which the staging site is cloned (for multisite subsite cloning) |
| 26 | * 0 or 1 = main site, 2+ = subsite |
| 27 | * @var int |
| 28 | */ |
| 29 | private $sourceBlogId = 0; |
| 30 | |
| 31 | /** |
| 32 | * @param bool $isStagingNetwork |
| 33 | * @return void |
| 34 | */ |
| 35 | public function setIsStagingNetwork(bool $isStagingNetwork) |
| 36 | { |
| 37 | $this->isStagingNetwork = $isStagingNetwork; |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * @return bool |
| 42 | */ |
| 43 | public function getIsStagingNetwork(): bool |
| 44 | { |
| 45 | return $this->isStagingNetwork; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * @param string $stagingNetworkDomain |
| 50 | * @return void |
| 51 | */ |
| 52 | public function setStagingNetworkDomain(string $stagingNetworkDomain) |
| 53 | { |
| 54 | $this->stagingNetworkDomain = $stagingNetworkDomain; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * @return string |
| 59 | */ |
| 60 | public function getStagingNetworkDomain(): string |
| 61 | { |
| 62 | return $this->stagingNetworkDomain; |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * @param string $stagingNetworkPath |
| 67 | * @return void |
| 68 | */ |
| 69 | public function setStagingNetworkPath(string $stagingNetworkPath) |
| 70 | { |
| 71 | $this->stagingNetworkPath = $stagingNetworkPath; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * @return string |
| 76 | */ |
| 77 | public function getStagingNetworkPath(): string |
| 78 | { |
| 79 | return $this->stagingNetworkPath; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * @param int $sourceBlogId |
| 84 | * @return void |
| 85 | */ |
| 86 | public function setSourceBlogId(int $sourceBlogId) |
| 87 | { |
| 88 | $this->sourceBlogId = $sourceBlogId; |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * @return int |
| 93 | */ |
| 94 | public function getSourceBlogId(): int |
| 95 | { |
| 96 | return $this->sourceBlogId; |
| 97 | } |
| 98 | } |
| 99 |