2016-07-05 12:29:40 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Station {
|
|
|
|
|
|
|
|
private $Callsign;
|
|
|
|
private $Via;
|
|
|
|
private $LastHeardTime;
|
|
|
|
private $Suffix;
|
|
|
|
private $CallsignOnly;
|
|
|
|
private $Peer;
|
2017-08-27 17:09:08 -04:00
|
|
|
private $OnModule;
|
2016-07-05 12:29:40 -04:00
|
|
|
|
2017-08-27 17:09:08 -04:00
|
|
|
public function __construct($Callsign, $Via, $Peer, $LastHeardTime, $OnModule) {
|
2016-07-05 12:29:40 -04:00
|
|
|
$this->Callsign = trim($Callsign);
|
|
|
|
$this->Via = trim($Via);
|
|
|
|
$this->Peer = trim($Peer);
|
|
|
|
$this->LastHeardTime = ParseTime($LastHeardTime);
|
|
|
|
if (strpos($Callsign, " / ") !== false) {
|
|
|
|
$this->Suffix = trim(substr($Callsign, strpos($Callsign, " / ")+3, strlen($Callsign)));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$this->Suffix = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
$tmp = explode(" ", $Callsign);
|
|
|
|
$this->CallsignOnly = $tmp[0];
|
2017-08-27 17:09:08 -04:00
|
|
|
$this->OnModule = $OnModule;
|
2016-07-05 12:29:40 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function GetCallsign() { return $this->Callsign; }
|
|
|
|
public function GetVIA() { return $this->Via; }
|
|
|
|
public function GetPeer() { return $this->Peer; }
|
|
|
|
public function GetLastHeardTime() { return $this->LastHeardTime; }
|
|
|
|
public function GetSuffix() { return $this->Suffix; }
|
|
|
|
public function GetCallsignOnly() { return $this->CallsignOnly; }
|
2017-08-27 17:09:08 -04:00
|
|
|
public function GetModule() { return $this->OnModule; }
|
2016-07-05 12:29:40 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|