byServerID($this->data['serverid']) ->byIP($this->data['ip']) ->one(); if($reverse == false) { $helper = new ReverseDNS(); $helper->setClientID($this->data['clientid']?:'0'); $helper->setIP($this->data['ip']); $helper->setServer($this->data['serverid']); $helper->setTTL($this->data['ttl']); $helper->setDomain($this->data['rdata']); $helper->create(); } else { $helper = new ReverseDNS($reverse); $helper->update(); } } catch (\Exception $ex) { } } public function remove( ) { $reverse = Repository::factory() ->byServerID($this->data['serverid']) ->byIP($this->data['ip']) ->one(); if($reverse != false) { $helper = new ReverseDNS($reverse); $helper->remove(); } else { $this->errors[] = 'Reverse not found in database'; } } }