コード例 #1
0
ファイル: AMF.php プロジェクト: how/openpasl
 public function __construct()
 {
     $this->gateway = new Gateway();
     $this->gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
     //Error types that will be rooted to the NetConnection debugger
     $this->gateway->setErrorHandling(E_ALL ^ E_NOTICE);
     $this->gateway->enableGzipCompression(25 * 1024);
 }
コード例 #2
0
ファイル: gateway.php プロジェクト: rdmpage/gbif-sdr
$gateway = new Gateway();
//Set where the services classes are loaded from, *with trailing slash*
//$servicesPath defined in globals.php
$gateway->setClassPath($servicesPath);
//Set where class mappings are loaded from (ie: for VOs)
//$voPath defined in globals.php
$gateway->setClassMappingsPath($voPath);
//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);
if (PRODUCTION_SERVER) {
    //Disable profiling, remote tracing, and service browser
    $gateway->disableDebug();
    // Keep the Flash/Flex IDE player from connecting to the gateway. Used for security to stop remote connections.
    $gateway->disableStandalonePlayer();
}
//If you are running into low-level issues with corrupt messages and
//the like, you can add $gateway->logIncomingMessages('path/to/incoming/messages/');
//and $gateway->logOutgoingMessages('path/to/outgoing/messages/'); here
//$gateway->logIncomingMessages('in/');
//$gateway->logOutgoingMessages('out/');
//Explicitly disable the native extension if it is installed
//$gateway->disableNativeExtension();
//Enable gzip compression of output if zlib is available,
//beyond a certain byte size threshold
$gateway->enableGzipCompression(25 * 1024);
//Service now
$gateway->service();
コード例 #3
0
//so don't be afraid if he forgot to turn off iconv by default!
$gateway->setCharsetHandler("mbstring", "UTF-8", "UTF-8");
//$gateway->setCharsetHandler("iconv", "GB2312", "GB2312");
//Error types that will be rooted to the NetConnection debugger
$gateway->setErrorHandling(E_ERROR);
if (PRODUCTION_SERVER) {
    //Disable profiling, remote tracing, and service browser
    $gateway->disableDebug();
    // Keep the Flash/Flex IDE player from connecting to the gateway. Used for security to stop remote connections.
    $gateway->disableStandalonePlayer();
    $gateway->disableAuth();
    $gateway->disableTrace();
}
//If you are running into low-level issues with corrupt messages and
//the like, you can add $gateway->logIncomingMessages('path/to/incoming/messages/');
//and $gateway->logOutgoingMessages('path/to/outgoing/messages/'); here
//$gateway->logIncomingMessages('in/');
//$gateway->logOutgoingMessages('out/');
//Explicitly disable the native extension if it is installed
//$gateway->disableNativeExtension();
//Enable gzip compression of output if zlib is available,
//beyond a certain byte size threshold
$gateway->enableGzipCompression(4096);
//Service now
$gateway->service();
//	$amfphp['totalTime'] = microtime_float() - $amfphp['startTime'];
//	$profile = new ProfilingHeader();
//	$pro_str = sprintf("%d\t%d\t%d\t%d\t%d\n",$profile->includeTime,
//	$profile->decodeTime,$profile->callTime,$profile->frameworkTime,
//	$amfphp['totalTime'] * 1000);
//	file_put_contents('./log/amfphp_profile.log',$pro_str,FILE_APPEND);