/** * This method used for get all firewall connection * @return type array */ public function getAll() { $sentence = new SentenceUtil(); $sentence->fromCommand("/ip/firewall/connection/getall"); $this->talker->send($sentence); $rs = $this->talker->getResult(); $i = 0; if ($i < $rs->size()) { return $rs->getResultArray(); } else { return "No Ip Firewall Connection To Set, Please Your Add Ip Firewall Connection"; } }
/** * * @param type $id string * @return type array * */ public function detail($id) { $sentence = new SentenceUtil(); $sentence->fromCommand("/ip/firewall/service-port/print"); $sentence->where(".id", "=", $id); $this->talker->send($sentence); $rs = $this->talker->getResult(); $i = 0; if ($i < $rs->size()) { return $rs->getResultArray(); } else { return "No Ip Firewall Service-Port With This id = " . $id; } }
/** * This method is used to display hotspot cookie * in detail based on the id * @param string $id * @return array * */ public function detail($id) { $sentence = new SentenceUtil(); $sentence->fromCommand("/ip/hotspot/cookie/print"); $sentence->where(".id", "=", $id); $this->talker->send($sentence); $rs = $this->talker->getResult(); $i = 0; if ($i < $rs->size()) { return $rs->getResultArray(); } else { return "No IP Hotspot Cookie With This id = " . $id; } }
/** * This method is used to display all ip dhcp relay * @return type array */ public function getAll() { $sentence = new SentenceUtil(); $sentence->fromCommand("/ip/dhcp-relay/getall"); $this->talker->send($sentence); $rs = $this->talker->getResult(); $i = 0; if ($i < $rs->size()) { return $rs->getResultArray(); } else { return "No Ip Dhcp-Relay To Set, Please Your Add Ip Dhcp-Relay"; } }
/** * This method is used to display one layer7 protocol * in detail based on the id * @param type $id string * @return type array * */ public function detail($id) { $sentence = new SentenceUtil(); $sentence->fromCommand("/ip/firewall/layer7-protocol/print"); $sentence->where(".id", "=", $id); $this->talker->send($sentence); $rs = $this->talker->getResult(); $i = 0; if ($i < $rs->size()) { return $rs->getResultArray(); } else { return "No IP Firewall Layer7 Protocol With This id = " . $id; } }