Skip to content

Commit d32646d

Browse files
committed
add simple method to access id-collection in search-query
1 parent c87b9df commit d32646d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Endpoints/Search.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ public function getTitles()
8888
return $titleCollection;
8989
}
9090

91+
public function getIds(){
92+
$idCollection = new Collection();
93+
$results = $this->query();
94+
95+
foreach ($results as $result) {
96+
$idCollection->add($result->getId());
97+
}
98+
return $idCollection;
99+
}
100+
91101
public function filterBy(string $filter)
92102
{
93103
$this->filter = $filter;

0 commit comments

Comments
 (0)