mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 06:45:14 -04:00
Implement OpenSearch feed search with FilterEbooks
This commit is contained in:
parent
e06fd910ed
commit
6c8e819316
7 changed files with 15 additions and 71 deletions
|
@ -429,23 +429,6 @@ class Library{
|
|||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<Ebook>
|
||||
* @throws Exceptions\AppException
|
||||
*/
|
||||
public static function Search(string $query): array{
|
||||
$ebooks = Library::GetEbooks();
|
||||
$matches = [];
|
||||
|
||||
foreach($ebooks as $ebook){
|
||||
if($ebook->Contains($query)){
|
||||
$matches[] = $ebook;
|
||||
}
|
||||
}
|
||||
|
||||
return $matches;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<Ebook>
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue