Filters
1 year ago
Scanning
5 years ago
AbstractFileObject.php
1 year ago
DebugLogReader.php
2 years ago
DirectoryListing.php
2 years ago
DiskWriteCheck.php
1 year ago
FileObject.php
1 year ago
Filesystem.php
1 year ago
FilesystemExceptions.php
5 years ago
FilterableDirectoryIterator.php
2 years ago
LogCleanup.php
2 years ago
LogFiles.php
2 years ago
MissingFileException.php
3 years ago
OPcache.php
2 years ago
PartIdentifier.php
1 year ago
PathChecker.php
2 years ago
PathIdentifier.php
1 year ago
Permissions.php
1 year ago
WpUploadsFolderSymlinker.php
5 years ago
PartIdentifier.php
92 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Framework\Filesystem; |
| 4 | |
| 5 | class PartIdentifier |
| 6 | { |
| 7 | /** @var string */ |
| 8 | const DATABASE_PART_IDENTIFIER = 'wpstgdb'; |
| 9 | |
| 10 | /** @var string */ |
| 11 | const MU_PLUGIN_PART_IDENTIFIER = 'muplugins'; |
| 12 | |
| 13 | /** @var string */ |
| 14 | const PLUGIN_PART_IDENTIFIER = 'plugins'; |
| 15 | |
| 16 | /** @var string */ |
| 17 | const THEME_PART_IDENTIFIER = 'themes'; |
| 18 | |
| 19 | /** @var string */ |
| 20 | const UPLOAD_PART_IDENTIFIER = 'uploads'; |
| 21 | |
| 22 | /** @var string */ |
| 23 | const LANGUAGE_PART_IDENTIFIER = 'lang'; |
| 24 | |
| 25 | /** @var string */ |
| 26 | const DROPIN_PART_IDENTIFIER = 'dropins'; |
| 27 | |
| 28 | /** |
| 29 | * @var string |
| 30 | * @deprecated use WP_CONTENT_PART_IDENTIFIER instead |
| 31 | */ |
| 32 | const OTHER_WP_CONTENT_PART_IDENTIFIER = 'otherfiles'; |
| 33 | |
| 34 | /** @var string */ |
| 35 | const WP_CONTENT_PART_IDENTIFIER = 'wpcontent'; |
| 36 | |
| 37 | /** |
| 38 | * @var string |
| 39 | * @deprecated use WP_ROOT_PART_IDENTIFIER instead |
| 40 | */ |
| 41 | const OTHER_WP_ROOT_PART_IDENTIFIER = 'rootfiles'; |
| 42 | |
| 43 | /** @var string */ |
| 44 | const WP_ROOT_PART_IDENTIFIER = 'wproot'; |
| 45 | |
| 46 | /** @var string */ |
| 47 | const DATABASE_PART_SIZE_IDENTIFIER = 'sqlSize'; |
| 48 | |
| 49 | /** @var string */ |
| 50 | const MU_PLUGIN_PART_SIZE_IDENTIFIER = 'mupluginsSize'; |
| 51 | |
| 52 | /** @var string */ |
| 53 | const PLUGIN_PART_SIZE_IDENTIFIER = 'pluginsSize'; |
| 54 | |
| 55 | /** @var string */ |
| 56 | const THEME_PART_SIZE_IDENTIFIER = 'themesSize'; |
| 57 | |
| 58 | /** @var string */ |
| 59 | const UPLOAD_PART_SIZE_IDENTIFIER = 'uploadsSize'; |
| 60 | |
| 61 | /** @var string */ |
| 62 | const LANGUAGE_PART_SIZE_IDENTIFIER = 'langSize'; |
| 63 | |
| 64 | /** @var string */ |
| 65 | const DROPIN_PART_SIZE_IDENTIFIER = 'dropinsSize'; |
| 66 | |
| 67 | /** @var string */ |
| 68 | const WP_CONTENT_PART_SIZE_IDENTIFIER = 'wpcontentSize'; |
| 69 | |
| 70 | /** @var string */ |
| 71 | const WP_ROOT_PART_SIZE_IDENTIFIER = 'wpRootSize'; |
| 72 | |
| 73 | /** |
| 74 | * List of drop-in files that need to be restored with a rename if their checksums differ. |
| 75 | * |
| 76 | * These files are specific to third party plugins like W3 Total Cache plugin and similar plugins and must be renamed with a `wpstg_bak.` prefix |
| 77 | * if their checksums do not match the expected values. This ensures that any discrepancies or issues with |
| 78 | * these files are avoided by preserving the original files with a backup prefix. |
| 79 | * @var array |
| 80 | */ |
| 81 | const DROP_IN_FILES = [ |
| 82 | 'object-cache.php', |
| 83 | 'advanced-cache.php', |
| 84 | 'db.php', |
| 85 | 'db-error.php', |
| 86 | 'install.php', |
| 87 | 'maintenance.php', |
| 88 | 'php-error.php', |
| 89 | 'fatal-error-handler.php' |
| 90 | ]; |
| 91 | } |
| 92 |