Printing data on numpad key press, first version. Settings page for mapping key to actions.
This commit is contained in:
@@ -24,7 +24,7 @@ class Airly
|
||||
return $this->stations;
|
||||
}
|
||||
|
||||
public function setStations($stations){
|
||||
public function setStations(array $stations){
|
||||
$this->stations = $stations;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,6 @@ class CinemaCinemaCity implements Cinema
|
||||
if (is_null($this->cinemaId) || is_null($this->day))
|
||||
throw new \Exception('Day or cinemaid not set.');
|
||||
|
||||
// if (!is_array($this->cinemaId)) {
|
||||
// $this->cinemaId = (array)$this->cinemaId;
|
||||
// }
|
||||
$url = 'https://www.cinema-city.pl/pgm-list-byfeat?si=' . $this->cinemaId . '&sort=cin&bd=' . $this->day;
|
||||
|
||||
return file_get_contents($url);
|
||||
@@ -41,9 +38,6 @@ class CinemaCinemaCity implements Cinema
|
||||
$document = json_decode($document);
|
||||
|
||||
|
||||
// $cinemaData = [];
|
||||
// $text = "Repertuar Cinema-City\n";
|
||||
// $text .= str_replace('/', '-', $this->day) . "\n\n";
|
||||
$movies = [];
|
||||
|
||||
$date = date('d/m/Y', strtotime($this->day));
|
||||
@@ -55,9 +49,6 @@ class CinemaCinemaCity implements Cinema
|
||||
foreach ($movieData->BD as $projections) {
|
||||
if ($projections->date == $date) {
|
||||
foreach ($projections->P as $projection) {
|
||||
|
||||
// var_dump($projection);
|
||||
// die();
|
||||
$movie['hours'][] = $projection->time;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user