summaryrefslogtreecommitdiffstats
path: root/lib/Db/ItemMapperV2.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Db/ItemMapperV2.php')
-rw-r--r--lib/Db/ItemMapperV2.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Db/ItemMapperV2.php b/lib/Db/ItemMapperV2.php
index edb8ba55f..222340744 100644
--- a/lib/Db/ItemMapperV2.php
+++ b/lib/Db/ItemMapperV2.php
@@ -95,12 +95,18 @@ class ItemMapperV2 extends NewsMapperV2
return $this->findEntity($builder);
}
- public function findByGuidHash(string $getGuidHash): Item
+ public function findByGuidHash(string $guidHash): Item
{
- throw new DoesNotExistException('fasi');
+ $builder = $this->db->getQueryBuilder();
+ $builder->addSelect('*')
+ ->from($this->tableName)
+ ->andWhere('guid_hash = :guid_hash')
+ ->setParameter(':guid_hash', $guidHash, IQueryBuilder::PARAM_STR);
+
+ return $this->findEntity($builder);
}
- public function findAllForFeed(int $feedId)
+ public function findAllForFeed(int $feedId): array
{
$builder = $this->db->getQueryBuilder();
$builder->addSelect('*')