-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from luft-jetzt/extract
Extract package
- Loading branch information
Showing
5 changed files
with
321 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,13 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"require": {} | ||
"require": { | ||
"php": "^7.4", | ||
"jms/serializer": "^3.10" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Caldera\\LuftModel\\": "src" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Caldera\LuftModel; | ||
|
||
use JMS\Serializer\Annotation as JMS; | ||
|
||
/** | ||
* @JMS\ExclusionPolicy("ALL") | ||
*/ | ||
class Station | ||
{ | ||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $stationCode = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?int $ubaStationId = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $title = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?float $latitude = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?float $longitude = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $cityName = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
* @JMS\Type("DateTime<'U'>") | ||
*/ | ||
protected ?\DateTime $fromDate = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
* @JMS\Type("DateTime<'U'>") | ||
*/ | ||
protected ?\DateTime $untilDate = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?int $altitude = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $stationType = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $areaType = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $provider = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
*/ | ||
protected ?string $network = null; | ||
|
||
public function getStationCode(): ?string | ||
{ | ||
return $this->stationCode; | ||
} | ||
|
||
public function setStationCode(string $stationCode): Station | ||
{ | ||
$this->stationCode = $stationCode; | ||
|
||
return $this; | ||
} | ||
|
||
public function getUbaStationId(): ?int | ||
{ | ||
return $this->ubaStationId; | ||
} | ||
|
||
public function setUbaStationId(int $ubaStationId): Station | ||
{ | ||
$this->ubaStationId = $ubaStationId; | ||
|
||
return $this; | ||
} | ||
|
||
public function getLatitude(): ?float | ||
{ | ||
return $this->latitude; | ||
} | ||
|
||
public function setLatitude(float $latitude): Station | ||
{ | ||
$this->latitude = $latitude; | ||
|
||
return $this; | ||
} | ||
|
||
public function getLongitude(): ?float | ||
{ | ||
return $this->longitude; | ||
} | ||
|
||
public function setLongitude(float $longitude): Station | ||
{ | ||
$this->longitude = $longitude; | ||
|
||
return $this; | ||
} | ||
|
||
public function getTitle(): ?string | ||
{ | ||
return $this->title; | ||
} | ||
|
||
public function setTitle(string $title = null): Station | ||
{ | ||
$this->title = $title; | ||
|
||
return $this; | ||
} | ||
|
||
public function setCity(string $cityName = null): Station | ||
{ | ||
$this->cityName = $cityName; | ||
|
||
return $this; | ||
} | ||
|
||
public function getCity(): ?string | ||
{ | ||
return $this->cityName; | ||
} | ||
|
||
public function getFromDate(): ?\DateTime | ||
{ | ||
return $this->fromDate; | ||
} | ||
|
||
public function setFromDate(\DateTime $fromDate = null): Station | ||
{ | ||
$this->fromDate = $fromDate; | ||
|
||
return $this; | ||
} | ||
|
||
public function getUntilDate(): ?\DateTime | ||
{ | ||
return $this->untilDate; | ||
} | ||
|
||
public function setUntilDate(\DateTime $untilDate = null): Station | ||
{ | ||
$this->untilDate = $untilDate; | ||
|
||
return $this; | ||
} | ||
|
||
public function getAltitude(): ?int | ||
{ | ||
return $this->altitude; | ||
} | ||
|
||
public function setAltitude(int $altitude): Station | ||
{ | ||
$this->altitude = $altitude; | ||
|
||
return $this; | ||
} | ||
|
||
public function getStationType(): ?string | ||
{ | ||
return $this->stationType; | ||
} | ||
|
||
public function setStationType(string $stationType = null): Station | ||
{ | ||
$this->stationType = $stationType; | ||
|
||
return $this; | ||
} | ||
|
||
public function getAreaType(): ?string | ||
{ | ||
return $this->areaType; | ||
} | ||
|
||
public function setAreaType(string $areaType = null): Station | ||
{ | ||
$this->areaType = $areaType; | ||
|
||
return $this; | ||
} | ||
|
||
public function getProvider(): ?string | ||
{ | ||
return $this->provider; | ||
} | ||
|
||
public function setProvider(string $provider): Station | ||
{ | ||
$this->provider = $provider; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Caldera\LuftModel; | ||
|
||
use JMS\Serializer\Annotation as JMS; | ||
|
||
/** | ||
* @JMS\ExclusionPolicy("ALL") | ||
*/ | ||
class Value | ||
{ | ||
/** | ||
* @JMS\Expose() | ||
* @JMS\Type("string") | ||
*/ | ||
protected ?string $stationCode = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
* @JMS\Type("DateTime<'U'>") | ||
*/ | ||
protected ?\DateTime $dateTime = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
* @JMS\Type("float") | ||
*/ | ||
protected ?float $value = null; | ||
|
||
/** | ||
* @JMS\Expose() | ||
* @JMS\Type("string") | ||
*/ | ||
protected ?string $pollutant = null; | ||
|
||
public function __construct() | ||
{ | ||
|
||
} | ||
|
||
public function getStationCode(): ?string | ||
{ | ||
return $this->stationCode; | ||
} | ||
|
||
public function setStationCode(string $stationCode): Value | ||
{ | ||
$this->stationCode = $stationCode; | ||
|
||
return $this; | ||
} | ||
|
||
public function getDateTime(): ?\DateTime | ||
{ | ||
return $this->dateTime; | ||
} | ||
|
||
public function setDateTime(\DateTime $dateTime): Value | ||
{ | ||
$this->dateTime = $dateTime; | ||
|
||
return $this; | ||
} | ||
|
||
public function getValue(): ?float | ||
{ | ||
return $this->value; | ||
} | ||
|
||
public function setValue(float $value): Value | ||
{ | ||
$this->value = $value; | ||
|
||
return $this; | ||
} | ||
|
||
public function getPollutant(): ?string | ||
{ | ||
return $this->pollutant; | ||
} | ||
|
||
public function setPollutant(string $pollutant): Value | ||
{ | ||
$this->pollutant = $pollutant; | ||
|
||
return $this; | ||
} | ||
} |