Fairmondo.php 723 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

namespace app\Models\parserSkripte;
use App\Models\Searchengine;

class Fairmondo extends Searchengine 
{
	public $results = [];

	function __construct (\SimpleXMLElement $engine,  \App\MetaGer $metager)
	{
		parent::__construct($engine, $metager);
	}

	public function loadResults ($result)
	{
		$results = json_decode($result, true);
		$results = $results["articles"];
		foreach($results as $result)
		{
			$title = $result["title"];
			$link = $result["html_url"];
			$anzeigeLink = $link;
			$descr = $result["slug"];

			$this->counter++;
			$this->results[] = new \App\Models\Result(
				$this->engine,
				$title,
				$link,
				$anzeigeLink,
				$descr,
				$this->gefVon,
				$this->counter
			);		
		}
	}
}