annotate core/modules/aggregator/src/FeedStorage.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents af1871eacc83
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\aggregator;
Chris@0 4
Chris@0 5 use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Controller class for aggregator's feeds.
Chris@0 9 *
Chris@0 10 * This extends the Drupal\Core\Entity\Sql\SqlContentEntityStorage class, adding
Chris@0 11 * required special handling for feed entities.
Chris@0 12 */
Chris@0 13 class FeedStorage extends SqlContentEntityStorage implements FeedStorageInterface {
Chris@0 14
Chris@0 15 /**
Chris@0 16 * {@inheritdoc}
Chris@0 17 */
Chris@0 18 public function getFeedIdsToRefresh() {
Chris@17 19 return $this->database->query('SELECT fid FROM {' . $this->getBaseTable() . '} WHERE queued = 0 AND checked + refresh < :time AND refresh <> :never', [
Chris@0 20 ':time' => REQUEST_TIME,
Chris@18 21 ':never' => static::CLEAR_NEVER,
Chris@0 22 ])->fetchCol();
Chris@0 23 }
Chris@0 24
Chris@0 25 }