You are here

protected function XmlParser::cleanUp in Feeds extensible parsers 8

Allows subclasses to cleanup after parsing.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed we are parsing for.

\Drupal\feeds\Result\ParserResultInterface $parser_result: The result of parsing.

\Drupal\feeds\StateInterface $state: The state object.

Overrides ParserBase::cleanUp

File

src/Feeds/Parser/XmlParser.php, line 107

Class

XmlParser
Defines a XML parser using XPath.

Namespace

Drupal\feeds_ex\Feeds\Parser

Code

protected function cleanUp(FeedInterface $feed, ParserResultInterface $result, StateInterface $state) {

  // Try to free up some memory. There shouldn't be any other references to
  // $this->xpath or the DOMDocument.
  unset($this->xpath);

  // Calculate progress.
  $state
    ->progress($state->total, $state->pointer);
}