You are here

public function FeedsSource::expire in Feeds 8.2

Removes all expired items from a feed.

File

lib/Drupal/feeds/FeedsSource.php, line 330
Definition of FeedsSourceInterface and FeedsSource class.

Class

FeedsSource
This class encapsulates a source of a feed. It stores where the feed can be found and how to import it.

Namespace

Drupal\feeds

Code

public function expire() {
  $this
    ->acquireLock();
  try {
    $result = $this->importer->processor
      ->expire($this);
  } catch (Exception $e) {

    // Will throw after the lock is released.
  }
  $this
    ->releaseLock();
  if (isset($e)) {
    throw $e;
  }
  return $result;
}