/** * This function is used to add active * @return array */ public function add($param) { $sentence = new SentenceUtil(); $sentence->addCommand("/ip/hotspot/active/add"); foreach ($param as $name => $value) { $sentence->setAttribute($name, $value); } $this->talker->send($sentence); return "Sucsess"; }
/** * This method is used to set or edit ip dhcp relay by id * @param type $param array * @param type $id string * @return type array */ public function set($param, $id) { $sentence = new SentenceUtil(); $sentence->addCommand("/ip/dhcp-relay/set"); foreach ($param as $name => $value) { $sentence->setAttribute($name, $value); } $sentence->where(".id", "=", $id); $this->talker->send($sentence); return "Sucsess"; }