/**
  * This method used for delete firewall connection
  * @param type $id string
  * @return type array
  */
 public function delete($id)
 {
     $sentence = new SentenceUtil();
     $sentence->addCommand("/ip/firewall/connection/remove");
     $sentence->where(".id", "=", $id);
     $this->talker->send($sentence);
     return "Sucsess";
 }
 /**
  *
  * @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;
     }
 }
Example #3
0
 /**
  * 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;
     }
 }
Example #4
0
 /**
  * This method used for get all Ip Firewall Mangle
  * @return type array
  */
 public function getAll()
 {
     $sentence = new SentenceUtil();
     $sentence->fromCommand("/ip/firewall/mangle/getall");
     $this->talker->send($sentence);
     $rs = $this->talker->getResult();
     $i = 0;
     if ($i < $rs->size()) {
         return $rs->getResultArray();
     } else {
         return "No Ip Firewall Mangle To Set, Please Your Add Ip Firewall Mangle";
     }
 }
Example #5
0
 /**
  * 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;
     }
 }