2016-01-01 07:42:52 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Station {
|
2016-02-11 12:51:12 -05:00
|
|
|
|
2016-01-01 07:42:52 -05:00
|
|
|
private $Callsign;
|
|
|
|
private $Via;
|
|
|
|
private $LastHeardTime;
|
|
|
|
private $Suffix;
|
|
|
|
private $CallsignOnly;
|
2016-02-11 12:51:12 -05:00
|
|
|
private $Peer;
|
|
|
|
|
|
|
|
public function __construct($Callsign, $Via, $Peer, $LastHeardTime) {
|
2016-01-01 07:42:52 -05:00
|
|
|
$this->Callsign = trim($Callsign);
|
|
|
|
$this->Via = trim($Via);
|
2016-02-11 12:51:12 -05:00
|
|
|
$this->Peer = trim($Peer);
|
2016-01-01 07:42:52 -05:00
|
|
|
$this->LastHeardTime = ParseTime($LastHeardTime);
|
|
|
|
if (strpos($Callsign, " / ") !== false) {
|
|
|
|
$this->Suffix = trim(substr($Callsign, strpos($Callsign, " / ")+3, strlen($Callsign)));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$this->Suffix = "";
|
|
|
|
}
|
2016-02-11 12:51:12 -05:00
|
|
|
|
2016-01-01 07:42:52 -05:00
|
|
|
$tmp = explode(" ", $Callsign);
|
|
|
|
$this->CallsignOnly = $tmp[0];
|
|
|
|
}
|
2016-02-11 12:51:12 -05:00
|
|
|
|
2016-01-01 07:42:52 -05:00
|
|
|
public function GetCallsign() { return $this->Callsign; }
|
|
|
|
public function GetVIA() { return $this->Via; }
|
2016-02-11 12:51:12 -05:00
|
|
|
public function GetPeer() { return $this->Peer; }
|
2016-01-01 07:42:52 -05:00
|
|
|
public function GetLastHeardTime() { return $this->LastHeardTime; }
|
|
|
|
public function GetSuffix() { return $this->Suffix; }
|
|
|
|
public function GetCallsignOnly() { return $this->CallsignOnly; }
|
2016-02-11 12:51:12 -05:00
|
|
|
|
2016-01-01 07:42:52 -05:00
|
|
|
}
|
|
|
|
|
2016-02-11 12:51:12 -05:00
|
|
|
?>
|