feat(*): refactor dynamic vs. static structure and distinctions; make additional elements dynamic
This commit is contained in:
parent
ca57082f01
commit
c021ea54ae
140 changed files with 1001 additions and 985 deletions
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Classes;
|
||||
|
||||
class BookFetcher extends PageFetcher
|
||||
{
|
||||
public function fetch(string $url): ?array
|
||||
{
|
||||
$cacheKey = "book_" . md5($url);
|
||||
$cached = $this->cacheGet($cacheKey);
|
||||
|
||||
if ($cached) return $cached;
|
||||
|
||||
$book = $this->fetchSingleFromApi("optimized_books", $url);
|
||||
|
||||
if (!$book) return null;
|
||||
|
||||
$book['globals'] = $this->getGlobals();
|
||||
|
||||
$this->cacheSet($cacheKey, $book);
|
||||
|
||||
return $book;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue