1 | <?php |
||
21 | class TranslationRepository extends EntityRepository |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Check for translations younger than timestamp. |
||
26 | * |
||
27 | * @param integer $timestamp |
||
28 | * @return integer |
||
29 | */ |
||
30 | public function findTranslationFreshness($timestamp) |
||
31 | { |
||
32 | return $this |
||
33 | ->createQueryBuilder('t') |
||
34 | ->select('count(t.transKey)') |
||
35 | ->where('t.dateUpdated > :timestamp') |
||
36 | ->setParameter('timestamp', $timestamp, \PDO::PARAM_INT) |
||
37 | ->getQuery() |
||
38 | ->getSingleScalarResult(); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Get a filtered list of translations. |
||
43 | * |
||
44 | * @param array $criteria |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getTranslationList(array $criteria) |
||
78 | } |
||
79 |