Skip to main content

GravityKit\GravityMigrate\ExternalMigrations

Boots external importer/exporter registries and controllers.

Since: %ver%

Source: src/ExternalMigrations.php:35

Details​

  • Kind: class
  • Namespace: GravityKit\GravityMigrate

Properties​

PropertyTypeDescription
$importersSourceRegistryImporter registry.
$exportersTargetRegistryExporter registry.
$importer_controllerImporterControllerImporter AJAX controller.
$exporter_controllerExporterControllerExporter AJAX controller.

Methods​

MethodDescription
__construct()Constructor.
get_instance()Returns the shared instance, constructing it on first use.
importers()Returns the importer registry, fully registered.
exporters()Returns the exporter registry, fully registered.
importer_controller()Returns the importer AJAX controller.
exporter_controller()Returns the exporter AJAX controller.

Method Reference​

__construct()​

public function __construct( ?Util $util=null )

Constructor.

Parameters​

NameTypeDefaultDescription
$utilUtil | nullnullUtility helper; the shared instance when omitted. Injected so the whole registry graph can be built without connecting a filesystem.

Since: %ver%

Source: src/ExternalMigrations.php:90

get_instance()​

public static function get_instance(): ExternalMigrations

Returns the shared instance, constructing it on first use.

Foundation's AjaxRouter applies the route filters at admin_init priority PHP_INT_MIN, before Plugin::init() at priority 10, so an AJAX request has to be able to construct this itself.

Returns​

  • ExternalMigrations

Since: %ver%

Source: src/ExternalMigrations.php:114

importers()​

public function importers(): SourceRegistry

Returns the importer registry, fully registered.

Returns​

  • SourceRegistry

Since: %ver%

Source: src/ExternalMigrations.php:129

exporters()​

public function exporters(): TargetRegistry

Returns the exporter registry, fully registered.

Returns​

  • TargetRegistry

Since: %ver%

Source: src/ExternalMigrations.php:140

importer_controller()​

public function importer_controller(): ImporterController

Returns the importer AJAX controller.

Returns​

  • ImporterController

Since: %ver%

Source: src/ExternalMigrations.php:151

exporter_controller()​

public function exporter_controller(): ExporterController

Returns the exporter AJAX controller.

Returns​

  • ExporterController

Since: %ver%

Source: src/ExternalMigrations.php:162