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 ...@@ -28,7 +28,8 @@ class Result
public $rank; # Das Ranking für das Ergebnis public $rank; # Das Ranking für das Ergebnis
# Erstellt ein neues 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); $provider = simplexml_load_string($provider);
$this->titel = strip_tags(trim($titel)); $this->titel = strip_tags(trim($titel));
...@@ -60,9 +61,9 @@ class Result ...@@ -60,9 +61,9 @@ class Result
$this->strippedDomain = $this->getStrippedDomain($this->strippedHost); $this->strippedDomain = $this->getStrippedDomain($this->strippedHost);
$this->strippedLink = $this->getStrippedLink($this->anzeigeLink); $this->strippedLink = $this->getStrippedLink($this->anzeigeLink);
$this->rank = 0; $this->rank = 0;
$this->partnershop = $partnershop; $this->partnershop = $additionalInformation["partnershop"] ?? false;
$this->image = $image; $this->image = $additionalInformation["image"] ?? "";
$this->price = $price; $this->price = $additionalInformation["price"] ?? 0;
$this->additionalInformation = $additionalInformation; $this->additionalInformation = $additionalInformation;
} }
......
...@@ -33,8 +33,7 @@ class Bing_bilder extends Searchengine ...@@ -33,8 +33,7 @@ class Bing_bilder extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
}); });
......
...@@ -38,8 +38,7 @@ class Dailymotion extends Searchengine ...@@ -38,8 +38,7 @@ class Dailymotion extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['partnershop' => false]
$image
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -52,9 +52,9 @@ class Ebay extends Searchengine ...@@ -52,9 +52,9 @@ class Ebay extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['partnershop' => false,
$image, 'price' => $price,
$price 'image' => $image]
); );
$count++; $count++;
} }
......
...@@ -51,8 +51,8 @@ class Ecoshopper extends Searchengine ...@@ -51,8 +51,8 @@ class Ecoshopper extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['partnershop' => false,
$image 'image' => $image]
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -44,8 +44,7 @@ class Europeana extends Searchengine ...@@ -44,8 +44,7 @@ class Europeana extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
} }
} }
......
...@@ -44,9 +44,9 @@ class Fairmondo extends Searchengine ...@@ -44,9 +44,9 @@ class Fairmondo extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, [
$image, 'price' => $price,
$price 'image' => $image]
); );
} }
} }
......
...@@ -39,8 +39,7 @@ class Fernsehsuche extends Searchengine ...@@ -39,8 +39,7 @@ class Fernsehsuche extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
} catch (\ErrorException $e) { } catch (\ErrorException $e) {
......
...@@ -39,8 +39,7 @@ class Flickr extends Searchengine ...@@ -39,8 +39,7 @@ class Flickr extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -44,8 +44,7 @@ class Mg_produkt2 extends Searchengine ...@@ -44,8 +44,7 @@ class Mg_produkt2 extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -39,8 +39,7 @@ class Openclipart extends Searchengine ...@@ -39,8 +39,7 @@ class Openclipart extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -39,8 +39,7 @@ class Pixabay extends Searchengine ...@@ -39,8 +39,7 @@ class Pixabay extends Searchengine
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter,
false, ['image' => $image]
$image
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -51,8 +51,7 @@ class Radiobrowser extends Searchengine ...@@ -51,8 +51,7 @@ class Radiobrowser extends Searchengine
$anzeigeLink, $anzeigeLink,
$descr, $descr,
$this->gefVon, $this->gefVon,
$this->counter, $this->counter
false
); );
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -31,10 +31,10 @@ class RlvProduct extends Searchengine ...@@ -31,10 +31,10 @@ class RlvProduct extends Searchengine
"", "",
$result["shopTitle"], $result["shopTitle"],
$counter, $counter,
$partnershop = false, ['partnershop' => false,
$image, 'price' => $result["price"],
$result["price"], 'image' => $image,
['shipping' => $result["distribution"]] '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