You are here

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

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

Implementation of FeedsParser::clear().

Delete variables containing resumptionToken and from used in last fetch.

File

./FeedsOAIParser.inc, line 54
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);
}