예제 #1
0
 /**
  * @param array $line
  * @return Wifi
  */
 public function parseLine($line)
 {
     $wifi = new Wifi();
     $wifi->setMac(MyUtils::macSeparator2Colon($line['netid']));
     $wifi->setSsid($line['ssid'] ? $line['ssid'] : "");
     $wifi->setComment(trim($line['comment']));
     $wifi->setName(trim($line['name']));
     $wifi->setType($line['type']);
     $wifi->setFreenet($line['freenet']);
     $wifi->setPaynet($line['paynet']);
     $wifi->setFirsttime(new DateTime($line['firsttime']));
     $wifi->setLasttime(new DateTime($line['lasttime']));
     $wifi->setFlags($line['flags']);
     $wifi->setWep($line['wep']);
     $wifi->setLatitude((double) $line['trilat']);
     $wifi->setLongitude((double) $line['trilong']);
     $wifi->setLastupdt($line['lastupdt']);
     $wifi->setChannel((int) $line['channel']);
     $wifi->setBcninterval($line['bcninterval']);
     $wifi->setQos((int) $line['qos']);
     $wifi->setSource(self::ID_SOURCE);
     return $wifi;
 }