hits; foreach ($results as $result) { $title = $result->tags; $link = $result->pageURL; $anzeigeLink = $link; $descr = ""; $image = $result->previewURL; $this->counter++; $this->results[] = new \App\Models\Result( $this->engine, $title, $link, $anzeigeLink, $descr, $this->gefVon, $this->counter, false, $image ); } } public function getNext(\App\MetaGer $metager, $result) { $page = $metager->getPage() + 1; $content = json_decode($result); if ($page * 20 > $content->total) { return; } $next = new Pixabay(simplexml_load_string($this->engine), $metager); $next->getString .= "&page=" . $page; $next->hash = md5($next->host . $next->getString . $next->port . $next->name); $this->next = $next; } }