當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gateway::setWebServiceHandler方法代碼示例

本文整理匯總了PHP中Gateway::setWebServiceHandler方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gateway::setWebServiceHandler方法的具體用法?PHP Gateway::setWebServiceHandler怎麽用?PHP Gateway::setWebServiceHandler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gateway的用法示例。


在下文中一共展示了Gateway::setWebServiceHandler方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Gateway

$gateway = new Gateway();
//Set where the services classes are loaded from, *with trailing slash*
$gateway->setBaseClassPath("services/");
//Loose mode means echo'ing or whitespace in your file won't make AMFPHP choke
$gateway->setLooseMode(true);
//Read above large note for explanation of charset handling
//The main contributor (Patrick Mineault) is French,
//so don't be afraid if he forgot to turn off iconv by default!
//$gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
//Error types that will be rooted to the NetConnection debugger
$gateway->setErrorHandling(E_ALL ^ E_NOTICE);
//choices are php5 (SoapClient), nusoap and pear
//If you don't plan on using web services with AMFPHP,
//you can safely let this setting alone
//Note that for nusoap to work you MUST place the library under /amf-core/lib/nusoap.php
$gateway->setWebServiceHandler('php5');
//Adding an adapter mapping will make returns of the mapped typed be intercepted
//and mapped in adapters/%adapterName%Adapter.php. This works by using get_class
//So for example, if you return a PEAR resultset object, it is an instance of DB_result
//And we want this to be processed as a recordset in adapters/peardbAdapter.php,
//hence the following line:
$gateway->addAdapterMapping('db_result', 'peardb');
//For PDO (PHP 5.1 specific)
$gateway->addAdapterMapping('pdostatement', 'pdo');
//For oo-style MySQLi
$gateway->addAdapterMapping('mysqli_result', 'mysqli');
//For filtered array
//And for filtered typed array (see adapters/lib/Arrayf.php and Arrayft.php)
$gateway->addAdapterMapping('arrayf', 'arrayf');
$gateway->addAdapterMapping('arrayft', 'arrayft');
//And you can add your own after this point... (note lowercase for both args!)
開發者ID:ksecor,項目名稱:civicrm,代碼行數:31,代碼來源:gateway.php


注:本文中的Gateway::setWebServiceHandler方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。