summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/migrate/src/MigrateLookupInterface.php
blob: ed2f2f3f1ce278734367d6e7aec8b7fbf5fc75e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace Drupal\migrate;

/**
 * Provides an interface for the migration lookup service.
 *
 * @package Drupal\migrate
 */
interface MigrateLookupInterface {

  /**
   * Retrieves destination ids from a migration lookup.
   *
   * @param string|string[] $migration_ids
   *   An array of migration plugin IDs to look up, or a single ID as a string.
   * @param array $source_id_values
   *   An array of source id values.
   *
   * @return array
   *   An array of arrays of destination ids, or an empty array if none were
   *   found.
   *
   * @throws \Drupal\Component\Plugin\Exception\PluginException
   *   Thrown by the migration plugin manager on error, or if the migration(s)
   *   cannot be found.
   * @throws \Drupal\migrate\MigrateException
   *   Thrown when $source_id_values contains unknown keys, or is the wrong
   *   length.
   */
  public function lookup($migration_ids, array $source_id_values);

}