public function hasFunction($function) { $mod = new WHMCS_Module("registrars"); $module = $this->getModule(); if (!$module) { $this->moduleresults = array("error" => "Domain not assigned to a registrar module"); return false; } $loaded = $mod->load($module); if (!$loaded) { $this->moduleresults = array("error" => "Registrar module not found"); return false; } return $mod->isExists($function); }
public function hasFunction($function) { $mod = new WHMCS_Module("servers"); $module = $this->getModule(); if (!$module) { $this->moduleresults = array("error" => "Service not assigned to a module"); return false; } $loaded = $mod->load($module); if (!$loaded) { $this->moduleresults = array("error" => "Product module not found"); return false; } return $mod->isExists($function); }