moduleData; $config['parentTask'] = $parent; $config['failOnParentFail'] = false; $config['proxyip'] = Property::getServerIp(); $config['proxyport'] = 3100 + $this->id(); $config['filename'] = $tgz; $config['moduleid'] = $this->id(); return Taskmanager::submit('CreateAdConfig', $config); } protected function moduleVersion() { return self::VERSION; } protected function validateConfig() { // Check if required fields are filled return Util::hasAllKeys($this->moduleData, self::$REQUIRED_FIELDS); } public function setData($key, $value) { if (!in_array($key, self::$REQUIRED_FIELDS) && !in_array($key, self::$OPTIONAL_FIELDS)) return false; $this->moduleData[$key] = $value; return true; } // ############## Callbacks ############################# /** * Server IP changed - rebuild all AD modules. */ public function event_serverIpChanged() { $this->generate(false); } }