GravityKit\GravityMigrate\Migration\BundleInspection
What a bundle carries, and whether this site could import it.
Reads the archive in place: nothing is staged, extracted, or written.
Since: %ver%
Source: src/Migration/BundleInspection.php:22
Details
- Kind:
class - Namespace:
GravityKit\GravityMigrate\Migration
Methods
| Method | Description |
|---|---|
encryption_refusal() | The refusal for an encrypted bundle, or null when the bundle is not encrypted. |
of() | What the bundle carries, and what this site would make of it. |
Method Reference
encryption_refusal()
public static function encryption_refusal( string $path ): ?WP_Error
The refusal for an encrypted bundle, or null when the bundle is not encrypted.
Reads only whether info.json opens, so it is cheap enough to run before staging.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$path | string | The bundle on this server. |
Returns
- WP_Error |
null
Since: 2.1.1
Source: src/Migration/BundleInspection.php:67
of()
public static function of( string $path, ?callable $is_reachable=null )
What the bundle carries, and what this site would make of it.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$path | string | The bundle on this server. | |
$is_reachable | callable | null | null | Given the source URL, whether this site could fetch from it. Defaults to the check the IMPORT applies, which is the only answer worth having -- passed in so the rule can be exercised without booting the import engine. |
Returns
array| WP_Error
Since: %ver%
Source: src/Migration/BundleInspection.php:111