$security_key = $_configuration['security_key']; } else { $security_key = $ip . $_configuration['security_key']; //error_log($secret_key.'-'.$security_key); } $result = api_is_valid_secret_key($secret_key, $security_key); //error_log($secret_key.'-'.$security_key); if ($debug) { error_log('WSHelperVerifyKey result: ' . intval($result)); } return $result; } // Create the server instance $server = new soap_server(); /** @var HookWSRegistration $hook */ $hook = HookWSRegistration::create(); if (!empty($hook)) { $hook->setEventData(array('server' => $server)); $res = $hook->notifyWSRegistration(HOOK_EVENT_TYPE_PRE); if (!empty($res['server'])) { $server = $res['server']; } } $server->soap_defencoding = 'UTF-8'; // Initialize WSDL support $server->configureWSDL('WSRegistration', 'urn:WSRegistration'); /* Register WSCreateUsers function */ // Register the data structures used by the service // Prepare input params $server->wsdl->addComplexType('extras', 'complexType', 'struct', 'all', '', array('field_name' => array('name' => 'field_name', 'type' => 'xsd:string'), 'field_value' => array('name' => 'field_value', 'type' => 'xsd:string'))); $server->wsdl->addComplexType('extrasList', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:extras[]')), 'tns:extras');
/** * This method will call the Hook management deleteHook to disable Hook observer from this plugin * @return int */ public function uninstallHook() { $hookObserver = HookAdvancedSubscription::create(); HookAdminBlock::create()->detach($hookObserver); HookWSRegistration::create()->detach($hookObserver); HookNotificationContent::create()->detach($hookObserver); HookNotificationTitle::create()->detach($hookObserver); }