annotate core/modules/migrate/src/Audit/AuditorInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 1fec387a4317
children
rev   line source
Chris@14 1 <?php
Chris@14 2
Chris@14 3 namespace Drupal\migrate\Audit;
Chris@14 4
Chris@14 5 use Drupal\migrate\Plugin\MigrationInterface;
Chris@14 6
Chris@14 7 /**
Chris@14 8 * Defines an interface for migration auditors.
Chris@14 9 *
Chris@14 10 * A migration auditor is a class which can examine a migration to determine if
Chris@14 11 * it will cause conflicts with data already existing in the destination system.
Chris@14 12 * What kind of auditing it does, and how it does it, is up to the implementing
Chris@14 13 * class.
Chris@14 14 */
Chris@14 15 interface AuditorInterface {
Chris@14 16
Chris@14 17 /**
Chris@14 18 * Audits a migration.
Chris@14 19 *
Chris@14 20 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
Chris@14 21 * The migration to audit.
Chris@14 22 *
Chris@14 23 * @throws \Drupal\migrate\Audit\AuditException
Chris@14 24 * If the audit fails.
Chris@14 25 *
Chris@14 26 * @return \Drupal\migrate\Audit\AuditResult
Chris@14 27 * The result of the audit.
Chris@14 28 */
Chris@14 29 public function audit(MigrationInterface $migration);
Chris@14 30
Chris@14 31 /**
Chris@14 32 * Audits a set of migrations.
Chris@14 33 *
Chris@14 34 * @param \Drupal\migrate\Plugin\MigrationInterface[] $migrations
Chris@14 35 * The migrations to audit.
Chris@14 36 *
Chris@14 37 * @return \Drupal\migrate\Audit\AuditResult[]
Chris@14 38 * The audit results, keyed by migration ID.
Chris@14 39 */
Chris@14 40 public function auditMultiple(array $migrations);
Chris@14 41
Chris@14 42 }