Commit fbf27e7c authored by Phil Höfer's avatar Phil Höfer
Browse files

Ergebnisformat umgestellt, sodass preise, bilder et c. in...

Ergebnisformat umgestellt, sodass preise, bilder et c. in $additionalInformation gespeichert werden.
parent d830514e
......@@ -28,7 +28,8 @@ class Result
public $rank; # Das Ranking für das Ergebnis
# Erstellt ein neues Ergebnis
public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $sourceRank, $partnershop = false, $image = "", $price = 0, $additionalInformation = [])
#public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $sourceRank, $partnershop = false, $image = "", $price = 0, $additionalInformation = [])
public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $sourceRank, $additionalInformation = [])
{
$provider = simplexml_load_string($provider);
$this->titel = strip_tags(trim($titel));
......@@ -60,9 +61,9 @@ class Result
$this->strippedDomain = $this->getStrippedDomain($this->strippedHost);
$this->strippedLink = $this->getStrippedLink($this->anzeigeLink);
$this->rank = 0;
$this->partnershop = $partnershop;
$this->image = $image;
$this->price = $price;
$this->partnershop = $additionalInformation["partnershop"] ?? false;
$this->image = $additionalInformation["image"] ?? "";
$this->price = $additionalInformation["price"] ?? 0;
$this->additionalInformation = $additionalInformation;
}
......
......@@ -33,8 +33,7 @@ class Bing_bilder extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
});
......
......@@ -38,8 +38,7 @@ class Dailymotion extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['partnershop' => false]
);
}
} catch (\Exception $e) {
......
......@@ -52,9 +52,9 @@ class Ebay extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image,
$price
['partnershop' => false,
'price' => $price,
'image' => $image]
);
$count++;
}
......
......@@ -51,8 +51,8 @@ class Ecoshopper extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['partnershop' => false,
'image' => $image]
);
}
} catch (\Exception $e) {
......
......@@ -44,8 +44,7 @@ class Europeana extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
}
}
......
......@@ -44,9 +44,9 @@ class Fairmondo extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image,
$price
[
'price' => $price,
'image' => $image]
);
}
}
......
......@@ -39,8 +39,7 @@ class Fernsehsuche extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
} catch (\ErrorException $e) {
......
......@@ -39,8 +39,7 @@ class Flickr extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
}
} catch (\Exception $e) {
......
......@@ -44,8 +44,7 @@ class Mg_produkt2 extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
}
} catch (\Exception $e) {
......
......@@ -39,8 +39,7 @@ class Openclipart extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
}
} catch (\Exception $e) {
......
......@@ -39,8 +39,7 @@ class Pixabay extends Searchengine
$descr,
$this->gefVon,
$this->counter,
false,
$image
['image' => $image]
);
}
} catch (\Exception $e) {
......
......@@ -51,8 +51,7 @@ class Radiobrowser extends Searchengine
$anzeigeLink,
$descr,
$this->gefVon,
$this->counter,
false
$this->counter
);
}
} catch (\Exception $e) {
......
......@@ -31,10 +31,10 @@ class RlvProduct extends Searchengine
"",
$result["shopTitle"],
$counter,
$partnershop = false,
$image,
$result["price"],
['shipping' => $result["distribution"]]
['partnershop' => false,
'price' => $result["price"],
'image' => $image,
'shipping' => $result["distribution"]]
);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment