You are here

public function FeedsOAIParser::clear in Feeds OAI-PMH Fetcher and Parser 6

Same name and namespace in other branches
  1. 7 FeedsOAIParser.inc \FeedsOAIParser::clear()

Implementation of FeedsParser::clear().

Delete variables containing resumptionToken and from used in last fetch.

Overrides FeedsParser::clear

File

./FeedsOAIParser.inc, line 50
Implementation of FeedsParser::parse().

Class

FeedsOAIParser
Class definition for OAI-PMH Dublin Core metadata parser.

Code

public function clear(FeedsSource $source) {

  // Only if FeedsOAIHTTPFetcher was used as the fetcher.
  if ($source->config['FeedsOAIHTTPFetcher']) {
    $oai_endpoint_url = $source->config['FeedsOAIHTTPFetcher']['source'];
    $set = $source->config['FeedsOAIHTTPFetcher']['set'];
    variable_del('feeds_oai:resumptionToken:' . $set . ':' . $oai_endpoint_url);
    variable_del('feeds_oai:from:' . $set . ':' . $oai_endpoint_url);
  }
  parent::clear($source);
}