]>
Commit | Line | Data |
---|---|---|
61351218 TC |
1 | <?php |
2 | ||
3 | namespace Wallabag\CoreBundle\Repository; | |
4 | ||
5 | use Doctrine\ORM\EntityRepository; | |
6 | ||
7 | class ChangeRepository extends EntityRepository | |
8 | { | |
9 | /** | |
10 | * Used only in test case to get a tag for our entry. | |
11 | * | |
12 | * @param int $timestamp | |
13 | * | |
14 | * @return Tag | |
15 | */ | |
16 | public function findChangesSinceDate($timestamp) | |
17 | { | |
18 | $date = new \DateTime(); | |
19 | $date->setTimestamp($timestamp); | |
20 | ||
21 | return $this->createQueryBuilder('c') | |
22 | ->where('c.createdAt >= :timestamp')->setParameter('timestamp', $date) | |
23 | ->getQuery() | |
24 | ->getResult(); | |
25 | } | |
26 | } |