comparison core/modules/migrate/src/MigrateSkipRowException.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 namespace Drupal\migrate;
4
5 /**
6 * This exception is thrown when a row should be skipped.
7 */
8 class MigrateSkipRowException extends \Exception {
9
10 /**
11 * Whether to record the skip in the map table, or skip silently.
12 *
13 * @var bool
14 * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently.
15 */
16 protected $saveToMap;
17
18 /**
19 * Constructs a MigrateSkipRowException object.
20 *
21 * @param string $message
22 * The message for the exception.
23 * @param bool $save_to_map
24 * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently.
25 */
26 public function __construct($message = NULL, $save_to_map = TRUE) {
27 parent::__construct($message);
28 $this->saveToMap = $save_to_map;
29 }
30
31 /**
32 * Whether the thrower wants to record this skip in the map table.
33 *
34 * @return bool
35 * TRUE to record as STATUS_IGNORED in the map, FALSE to skip silently.
36 */
37 public function getSaveToMap() {
38 return $this->saveToMap;
39 }
40
41 }