Mercurial > hg > isophonics-drupal-site
annotate core/modules/migrate/src/MigrateSkipRowException.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\migrate; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * This exception is thrown when a row should be skipped. |
Chris@0 | 7 */ |
Chris@0 | 8 class MigrateSkipRowException extends \Exception { |
Chris@0 | 9 |
Chris@0 | 10 /** |
Chris@0 | 11 * Whether to record the skip in the map table, or skip silently. |
Chris@0 | 12 * |
Chris@0 | 13 * @var bool |
Chris@0 | 14 * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently. |
Chris@0 | 15 */ |
Chris@0 | 16 protected $saveToMap; |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Constructs a MigrateSkipRowException object. |
Chris@0 | 20 * |
Chris@0 | 21 * @param string $message |
Chris@0 | 22 * The message for the exception. |
Chris@0 | 23 * @param bool $save_to_map |
Chris@0 | 24 * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently. |
Chris@0 | 25 */ |
Chris@0 | 26 public function __construct($message = NULL, $save_to_map = TRUE) { |
Chris@0 | 27 parent::__construct($message); |
Chris@0 | 28 $this->saveToMap = $save_to_map; |
Chris@0 | 29 } |
Chris@0 | 30 |
Chris@0 | 31 /** |
Chris@0 | 32 * Whether the thrower wants to record this skip in the map table. |
Chris@0 | 33 * |
Chris@0 | 34 * @return bool |
Chris@0 | 35 * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently. |
Chris@0 | 36 */ |
Chris@0 | 37 public function getSaveToMap() { |
Chris@0 | 38 return $this->saveToMap; |
Chris@0 | 39 } |
Chris@0 | 40 |
Chris@0 | 41 } |