Skip to main content

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​

MethodDescription
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​

NameTypeDefaultDescription
$pathstringThe bundle on this server.

Returns​

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​

NameTypeDefaultDescription
$pathstringThe bundle on this server.
$is_reachablecallable | nullnullGiven 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​

Since: %ver%

Source: src/Migration/BundleInspection.php:111