MigrateLookupInterface.php 930 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Drupal\migrate;
  3. /**
  4. * Provides an interface for the migration lookup service.
  5. *
  6. * @package Drupal\migrate
  7. */
  8. interface MigrateLookupInterface {
  9. /**
  10. * Retrieves destination ids from a migration lookup.
  11. *
  12. * @param string|string[] $migration_ids
  13. * An array of migration plugin IDs to look up, or a single ID as a string.
  14. * @param array $source_id_values
  15. * An array of source id values.
  16. *
  17. * @return array
  18. * An array of arrays of destination ids, or an empty array if none were
  19. * found.
  20. *
  21. * @throws \Drupal\Component\Plugin\Exception\PluginException
  22. * Thrown by the migration plugin manager on error, or if the migration(s)
  23. * cannot be found.
  24. * @throws \Drupal\migrate\MigrateException
  25. * Thrown when $source_id_values contains unknown keys, or is the wrong
  26. * length.
  27. */
  28. public function lookup($migration_ids, array $source_id_values);
  29. }