• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vtws_addWebserviceOperation函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vtws_addWebserviceOperation函数的典型用法代码示例。如果您正苦于以下问题:PHP vtws_addWebserviceOperation函数的具体用法?PHP vtws_addWebserviceOperation怎么用?PHP vtws_addWebserviceOperation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vtws_addWebserviceOperation函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: VT520GA_webserviceMigrate

function VT520GA_webserviceMigrate()
{
    require_once 'include/Webservices/Utils.php';
    $customWebserviceDetails = array("name" => "revise", "include" => "include/Webservices/Revise.php", "handler" => "vtws_revise", "prelogin" => 0, "type" => "POST");
    $customWebserviceParams = array(array("name" => 'element', "type" => 'Encoded'));
    echo 'INITIALIZING WEBSERVICE...';
    $operationId = vtws_addWebserviceOperation($customWebserviceDetails['name'], $customWebserviceDetails['include'], $customWebserviceDetails['handler'], $customWebserviceDetails['type']);
    if ($operationId === null && $operationId > 0) {
        echo 'FAILED TO SETUP ' . $customWebserviceDetails['name'] . ' WEBSERVICE';
        die;
    }
    $sequence = 1;
    foreach ($customWebserviceParams as $param) {
        $status = vtws_addWebserviceOperationParam($operationId, $param['name'], $param['type'], $sequence++);
        if ($status === false) {
            echo 'FAILED TO SETUP ' . $customWebserviceDetails['name'] . ' WEBSERVICE HALFWAY THOURGH';
            die;
        }
    }
    $moduleList = vtws_getModuleNameList();
    foreach ($moduleList as $moduleName) {
        vtws_addDefaultModuleTypeEntity($moduleName);
    }
    ExecuteQuery("delete from vtiger_ws_fieldtype where uitype=116;");
    ExecuteQuery("update vtiger_field set uitype=117 where tabid=29 and fieldname='currency_id';");
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:26,代码来源:520rc_to_520.php


示例2: array

/**
* Given the details of a webservices definition, it creates it if it doesn't exist already
* @param $operationInfo array with the new web service method definition. Like this:
 $operationInfo = array(
	 'name'    => 'getRelatedRecords',
	 'include' => 'include/Webservices/GetRelatedRecords.php',
	 'handler' => 'getRelatedRecords',
	 'prelogin'=> 0,
	 'type'    => 'POST',
	 'parameters' => array(
	 	array('name' => 'id','type' => 'String'),
	 	array('name' => 'module','type' => 'String'),
	 	array('name' => 'relatedModule','type' => 'String'),
	 	array('name' => 'queryParameters','type' => 'encoded')
	 )
 );
* @return false if already registered, true if registered correctly
* @errors Failed to create webservice and Failed to setup parameters
*/
function registerWSAPI($operationInfo)
{
    global $adb;
    if (!isset($operationInfo['prelogin'])) {
        $operationInfo['prelogin'] = 0;
    }
    $check = $adb->pquery('SELECT 1 FROM vtiger_ws_operation WHERE name=?', array($operationInfo['name']));
    if ($check && $adb->num_rows($check)) {
        return false;
        // it exists > we leave
    }
    $operationId = vtws_addWebserviceOperation($operationInfo['name'], $operationInfo['include'], $operationInfo['handler'], $operationInfo['type'], $operationInfo['prelogin']);
    if (empty($operationId)) {
        throw new Exception('FAILED TO SETUP ' . $operationInfo['name'] . ' WEBSERVICE');
    }
    $sequence = 1;
    foreach ($operationInfo['parameters'] as $parameters) {
        $status = vtws_addWebserviceOperationParam($operationId, $parameters['name'], $parameters['type'], $sequence++);
        if ($status === false) {
            throw new Exception('FAILED TO SETUP ' . $parameters['name'] . ' WEBSERVICE HALFWAY THOURGH');
        }
    }
    return true;
}
开发者ID:kduqi,项目名称:corebos,代码行数:43,代码来源:Utils.php


示例3: vtws_addOperationInfo

 function vtws_addOperationInfo()
 {
     $operationMeta = array("login" => array("include" => array("include/Webservices/Login.php"), "handler" => "vtws_login", "params" => array("username" => "String", "accessKey" => "String"), "prelogin" => 1, "type" => "POST"), "retrieve" => array("include" => array("include/Webservices/Retrieve.php"), "handler" => "vtws_retrieve", "params" => array("id" => "String"), "prelogin" => 0, "type" => "GET"), "create" => array("include" => array("include/Webservices/Create.php"), "handler" => "vtws_create", "params" => array("elementType" => "String", "element" => "encoded"), "prelogin" => 0, "type" => "POST"), "update" => array("include" => array("include/Webservices/Update.php"), "handler" => "vtws_update", "params" => array("element" => "encoded"), "prelogin" => 0, "type" => "POST"), "delete" => array("include" => array("include/Webservices/Delete.php"), "handler" => "vtws_delete", "params" => array("id" => "String"), "prelogin" => 0, "type" => "POST"), "sync" => array("include" => array("include/Webservices/GetUpdates.php"), "handler" => "vtws_sync", "params" => array("modifiedTime" => "DateTime", "elementType" => "String"), "prelogin" => 0, "type" => "GET"), "query" => array("include" => array("include/Webservices/Query.php"), "handler" => "vtws_query", "params" => array("query" => "String"), "prelogin" => 0, "type" => "GET"), "logout" => array("include" => array("include/Webservices/Logout.php"), "handler" => "vtws_logout", "params" => array("sessionName" => "String"), "prelogin" => 0, "type" => "POST"), "listtypes" => array("include" => array("include/Webservices/ModuleTypes.php"), "handler" => "vtws_listtypes", "params" => array("fieldTypeList" => "encoded"), "prelogin" => 0, "type" => "GET"), "getchallenge" => array("include" => array("include/Webservices/AuthToken.php"), "handler" => "vtws_getchallenge", "params" => array("username" => "String"), "prelogin" => 1, "type" => "GET"), "describe" => array("include" => array("include/Webservices/DescribeObject.php"), "handler" => "vtws_describe", "params" => array("elementType" => "String"), "prelogin" => 0, "type" => "GET"), "extendsession" => array("include" => array("include/Webservices/ExtendSession.php"), "handler" => "vtws_extendSession", 'params' => array(), "prelogin" => 1, "type" => "POST"), 'convertlead' => array("include" => array("include/Webservices/ConvertLead.php"), "handler" => "vtws_convertlead", "prelogin" => 0, "type" => "POST", 'params' => array('leadId' => 'String', 'assignedTo' => 'String', 'accountName' => 'String', 'avoidPotential' => 'Boolean', 'potential' => 'Encoded')), "revise" => array("include" => array("include/Webservices/Revise.php"), "handler" => "vtws_revise", "params" => array("element" => "Encoded"), "prelogin" => 0, "type" => "POST"), "changePassword" => array("include" => array("include/Webservices/ChangePassword.php"), "handler" => "vtws_changePassword", "params" => array("id" => "String", "oldPassword" => "String", "newPassword" => "String", 'confirmPassword' => 'String'), "prelogin" => 0, "type" => "POST"), "deleteUser" => array("include" => array("include/Webservices/DeleteUser.php"), "handler" => "vtws_deleteUser", "params" => array("id" => "String", "newOwnerId" => "String"), "prelogin" => 0, "type" => "POST"));
     foreach ($operationMeta as $operationName => $operationDetails) {
         $operationId = vtws_addWebserviceOperation($operationName, $operationDetails['include'], $operationDetails['handler'], $operationDetails['type'], $operationDetails['prelogin']);
         $params = $operationDetails['params'];
         $sequence = 1;
         foreach ($params as $paramName => $paramType) {
             vtws_addWebserviceOperationParam($operationId, $paramName, $paramType, $sequence++);
         }
     }
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:12,代码来源:DefaultDataPopulator.php


示例4: VT520_webserviceMigrate

function VT520_webserviceMigrate()
{
    require_once 'include/Webservices/Utils.php';
    $customWebserviceDetails = array("name" => "convertlead", "include" => "include/Webservices/ConvertLead.php", "handler" => "vtws_convertlead", "prelogin" => 0, "type" => "POST");
    $customWebserviceParams = array(array("name" => 'leadId', "type" => 'String'), array("name" => 'assignedTo', 'type' => 'String'), array("name" => 'accountName', 'type' => 'String'), array("name" => 'avoidPotential', 'type' => 'Boolean'), array("name" => 'potential', 'type' => 'Encoded'));
    echo 'INITIALIZING WEBSERVICE...';
    $operationId = vtws_addWebserviceOperation($customWebserviceDetails['name'], $customWebserviceDetails['include'], $customWebserviceDetails['handler'], $customWebserviceDetails['type']);
    if ($operationId === null && $operationId > 0) {
        echo 'FAILED TO SETUP ' . $customWebserviceDetails['name'] . ' WEBSERVICE';
        die;
    }
    $sequence = 1;
    foreach ($customWebserviceParams as $param) {
        $status = vtws_addWebserviceOperationParam($operationId, $param['name'], $param['type'], $sequence++);
        if ($status === false) {
            echo 'FAILED TO SETUP ' . $customWebserviceDetails['name'] . ' WEBSERVICE HALFWAY THOURGH';
            die;
        }
    }
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:20,代码来源:510_to_520rc.php


示例5: array

        $cur_id = $adb->query_result($cur_result, $i, "id");
        $currency_exists = $adb->pquery("SELECT * from vtiger_currencies WHERE currency_code=?", array($cur_code));
        if ($adb->num_rows($currency_exists) > 0) {
            $currency_name = $adb->query_result($currency_exists, 0, "currency_name");
            ExecuteQuery("UPDATE vtiger_currency_info SET vtiger_currency_info.currency_name='{$currency_name}' WHERE id={$cur_id}");
        } else {
            $currencyId = $adb->getUniqueID("vtiger_currencies");
            ExecuteQuery("INSERT INTO vtiger_currencies VALUES ({$currencyId}, '{$cur_name}', '{$cur_code}', '{$cur_symbol}')");
        }
    }
}
vt530_updateCurrencyInfo();
// Change Password & Delete User Webservice apis
$operationMeta = array("changePassword" => array("include" => array("include/Webservices/ChangePassword.php"), "handler" => "vtws_changePassword", "params" => array("id" => "String", "oldPassword" => "String", "newPassword" => "String", 'confirmPassword' => 'String'), "prelogin" => 0, "type" => "POST"), "deleteUser" => array("include" => array("include/Webservices/DeleteUser.php"), "handler" => "vtws_deleteUser", "params" => array("id" => "String", "newOwnerId" => "String"), "prelogin" => 0, "type" => "POST"));
foreach ($operationMeta as $operationName => $operationDetails) {
    $operationId = vtws_addWebserviceOperation($operationName, $operationDetails['include'], $operationDetails['handler'], $operationDetails['type'], $operationDetails['prelogin']);
    $params = $operationDetails['params'];
    $sequence = 1;
    foreach ($params as $paramName => $paramType) {
        vtws_addWebserviceOperationParam($operationId, $paramName, $paramType, $sequence++);
    }
}
$usersModuleInstance = Vtiger_Module::getInstance('Users');
$blockInstance = Vtiger_Block::getInstance('LBL_MORE_INFORMATION', $usersModuleInstance);
$fieldInstance = new Vtiger_Field();
$fieldInstance->name = 'theme';
$fieldInstance->label = 'Theme';
$fieldInstance->table = 'vtiger_users';
$fieldInstance->column = 'theme';
$fieldInstance->columntype = 'VARCHAR(100)';
$fieldInstance->uitype = 31;
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:521_to_530rc.php


示例6: register

 function register()
 {
     $adb = PearDatabase::getInstance();
     $checkresult = $adb->pquery("SELECT 1 FROM vtiger_ws_operation WHERE name = ?", array($this->opName));
     if ($adb->num_rows($checkresult)) {
         return;
     }
     Vtiger_Utils::Log("Enabling webservice operation {$this->opName}", true);
     $operationid = vtws_addWebserviceOperation($this->opName, $this->opFile, $this->opClass, $this->opType);
     for ($index = 0; $index < count($this->parameters); ++$index) {
         vtws_addWebserviceOperationParam($operationid, $this->parameters[$index]['name'], $this->parameters[$index]['type'], $index + 1);
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:13,代码来源:Mobile.php


示例7: array

    $customer->setRelatedModules(array('Contacts'));
}
$moduleInstance = Vtiger_Module::getInstance('Potentials');
$filter = Vtiger_Filter::getInstance('All', $moduleInstance);
$fieldInstance = Vtiger_Field::getInstance('amount', $moduleInstance);
$filter->addField($fieldInstance, 6);
if (file_exists('modules/ModTracker/ModTrackerUtils.php')) {
    require_once 'modules/ModTracker/ModTrackerUtils.php';
    $modules = $adb->pquery('SELECT * FROM vtiger_tab WHERE isentitytype = 1', array());
    $rows = $adb->num_rows($modules);
    for ($i = 0; $i < $rows; $i++) {
        $tabid = $adb->query_result($modules, $i, 'tabid');
        ModTrackerUtils::modTrac_changeModuleVisibility($tabid, 'module_enable');
    }
}
$operationId = vtws_addWebserviceOperation('retrieve_inventory', 'include/Webservices/LineItem/RetrieveInventory.php', 'vtws_retrieve_inventory', 'GET');
vtws_addWebserviceOperationParam($operationId, 'id', 'String', 1);
$moduleInstance = Vtiger_Module::getInstance('Events');
$tabId = getTabid('Events');
// Update/Increment the sequence for the succeeding blocks of Events module, with starting sequence 3
Migration_Index_View::ExecuteQuery('UPDATE vtiger_blocks SET sequence = sequence+1 WHERE tabid=? AND sequence >= 3', array($tabId));
// Create Recurrence Information block
$recurrenceBlock = new Vtiger_Block();
$recurrenceBlock->label = 'LBL_RECURRENCE_INFORMATION';
$recurrenceBlock->sequence = 3;
$moduleInstance->addBlock($recurrenceBlock);
$blockId = getBlockId($tabId, 'LBL_RECURRENCE_INFORMATION');
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET block=? WHERE fieldname=? and tabid=?', array($blockId, 'recurringtype', $tabId));
// Update/Increment the sequence for the succeeding blocks of Users module, with starting sequence 2
$moduleInstance = Vtiger_Module::getInstance('Users');
$tabId = getTabid('Users');
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:31,代码来源:540_to_600RC.php


示例8: chdir

<?php

/*+**********************************************************************************
 * The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ************************************************************************************/
/***********************************************************
danzi.tn@20150427 template per la creazione di un modulo
                  da utilizzare dopo aver creato il modulo con la console
**/
chdir(dirname(__FILE__) . '/../..');
include_once 'vtlib/Vtiger/Module.php';
include_once 'vtlib/Vtiger/Package.php';
include_once 'includes/main/WebUI.php';
include_once 'include/Webservices/Utils.php';
$Vtiger_Utils_Log = true;
$SINGLE_MODULENAME = 'Rumor';
$MODULENAME = $SINGLE_MODULENAME . 's';
$operationId = vtws_addWebserviceOperation('process_email', 'include/Webservices/danzi.tn/ProcessEmail.php', 'vtws_process_email', 'POST');
vtws_addWebserviceOperationParam($operationId, 'email', 'String', 1);
vtws_addWebserviceOperationParam($operationId, 'element', 'encoded', 2);
开发者ID:andreadanzi,项目名称:sws,代码行数:25,代码来源:create_ws_operation.php



注:本文中的vtws_addWebserviceOperation函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vtws_addWebserviceOperationParam函数代码示例发布时间:2022-05-23
下一篇:
PHP vtws_addActorTypeWebserviceEntityWithName函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap