if (sizeof($this->generes) == 0) { echo "\nGenre unbekannt"; } if ($this->imdbRating == null) { echo "\nimdbRating unbekannt"; } if ($this->duration == null) { echo "\nDauer unbekannt\n\n"; } } } $file = fopen("data.csv", "r"); $user1 = new User(); $user1->loadFromCsv($file); fclose($file); echo "Ergebniss: \n\n\nnicht gefundene Datensaetze:\n"; foreach ($user1->getRuntimeSum()[1] as $m) { echo "\n" . $m->getTitle() . ":\n"; $m->getUnbekannte(); //TODO improve by running on all fields } echo $user1->getRuntimeSum()[0] . " minutes watched[*]\n"; echo sizeof($user1->getRuntimeSum()[1]) . " nicht gezählt!:\n"; /*echo $user1->getMovieCount()." streams\n"; //echo $user1->movies[1]->getName()."\n"; */ echo "\nImdb score: " . $user1->getSumImdbScore()[0] . "\n"; echo "Genres\n"; print_r($user1->getGeneres()[0]); echo "(" . sizeof($user1->getGeneres()[1]) . " nicht zuordbar)\n"; echo "\n";
format: '<b>{point.name}</b>: {point.percentage:.1f} %', style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' } } } }, series: [{ name: 'Genres', // Define the data points. All series have a dummy year // of 1970/71 in order to be compared on the same x axis. Note // that in JavaScript, months start at 0 for January, 1 for February etc. colorByPoint: true, data: [ <?php $g = array_keys($user1->getGeneres()[0]); foreach ($g as $genre) { echo '{name: "' . $genre . '", ' . 'y: ' . $user1->getGeneres()[0][$genre] . '},'; } ?> ]//TODO save multiple dates }] }); var gaugeOptions = { chart: { type: 'solidgauge' }, title: { text: 'Dein Filmgeschmack'