for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the feed-io package.
*
* (c) Alexandre Debril <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FeedIo\Filter;
use FeedIo\FeedInterface;
use FeedIo\Feed\ItemInterface;
use FeedIo\FilterInterface;
class ModifiedSince implements FilterInterface
{
/**
* @var \DateTime
protected $date;
* ModifiedSince constructor.
* @param \DateTime $date
public function __construct(\DateTime $date)
$this->date = $date;
}
* @param ItemInterface $item
* @return bool
public function isValid(ItemInterface $item)
if ($item->getLastModified() instanceof \DateTime) {
return $item->getLastModified() > $this->date;
return false;