DomProcessBase.php in Migrate Plus 8.4
File
src/Plugin/migrate/process/DomProcessBase.php
View source
<?php
namespace Drupal\migrate_plus\Plugin\migrate\process;
use Drupal\migrate\MigrateSkipRowException;
use Drupal\migrate\ProcessPluginBase;
abstract class DomProcessBase extends ProcessPluginBase {
protected $document;
protected $xpath;
protected function init($value, $destination_property) {
if (!$value instanceof \DOMDocument) {
$message = sprintf('The %s plugin in the %s process pipeline requires a \\DOMDocument object. You can use the dom plugin to convert a string to \\DOMDocument.', $this
->getPluginId(), $destination_property);
throw new MigrateSkipRowException($message);
}
$this->document = $value;
$this->xpath = new \DOMXPath($this->document);
}
}
Classes
Name |
Description |
DomProcessBase |
Base class for process plugins that work with \DOMDocument objects. |