当前位置: 首页>>代码示例>>PHP>>正文


PHP Phpfox::endLog方法代码示例

本文整理汇总了PHP中Phpfox::endLog方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::endLog方法的具体用法?PHP Phpfox::endLog怎么用?PHP Phpfox::endLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Phpfox的用法示例。


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

示例1: callback

 public function callback($sGateway)
 {
     Phpfox::startLog('Callback started.');
     Phpfox::log('Request: ' . var_export($_REQUEST, true));
     if (empty($sGateway)) {
         Phpfox::log('Gateway is empty.');
         Phpfox::getService('api.gateway.process')->addLog(null, Phpfox::endLog());
         return false;
     }
     $aGateway = $this->database()->select('ag.*')->from($this->_sTable, 'ag')->where('ag.gateway_id = \'' . $this->database()->escape($sGateway) . '\' AND ag.is_active = 1')->execute('getRow');
     // http://www.phpfox.com/tracker/view/15424/
     if ($sGateway == 'activitypoints' && Phpfox::getParam('user.can_purchase_with_points') && Phpfox::getUserParam('user.can_purchase_with_points')) {
         Phpfox::log('Gateway successfully loaded.');
         Phpfox::log('Callback complete');
         Phpfox::getService('api.gateway.process')->addLog($aGateway['gateway_id'], Phpfox::endLog());
         return true;
     }
     if (!isset($aGateway['gateway_id'])) {
         Phpfox::log('"' . $sGateway . '" is not a valid gateway.');
         Phpfox::getService('api.gateway.process')->addLog(null, Phpfox::endLog());
         return false;
     }
     Phpfox::log('Attempting to load gateway: ' . $aGateway['gateway_id']);
     if (!($oGateway = Phpfox::getLib('gateway')->load($aGateway['gateway_id'], array_merge($_REQUEST, $aGateway)))) {
         Phpfox::log('Unable to load gateway.');
         Phpfox::getService('api.gateway.process')->addLog($aGateway['gateway_id'], Phpfox::endLog());
         return false;
     }
     Phpfox::log('Gateway successfully loaded.');
     $mReturn = $oGateway->callback();
     Phpfox::log('Callback complete');
     Phpfox::getService('api.gateway.process')->addLog($aGateway['gateway_id'], Phpfox::endLog());
     if ($mReturn == 'redirect') {
         Phpfox_Url::instance()->send('');
     }
 }
开发者ID:noikiy,项目名称:phpfox-dist,代码行数:36,代码来源:gateway.class.php

示例2: callback

	public function callback($sGateway)
	{
		Phpfox::startLog('Callback started.');
		Phpfox::log('Request: ' . var_export($_REQUEST, true));
		
		if (empty($sGateway))
		{
			Phpfox::log('Gateway is empty.');
			Phpfox::getService('api.gateway.process')->addLog(null, Phpfox::endLog());
			
			return false;
		}
		
		$aGateway = $this->database()->select('ag.*')
			->from($this->_sTable, 'ag')
			->where('ag.gateway_id = \'' . $this->database()->escape($sGateway) . '\' AND ag.is_active = 1')
			->execute('getRow');
			
		if (!isset($aGateway['gateway_id']))
		{
			Phpfox::log('"' . $sGateway . '" is not a valid gateway.');
			Phpfox::getService('api.gateway.process')->addLog(null, Phpfox::endLog());
			
			return false;
		}
		
		Phpfox::log('Attempting to load gateway: ' . $aGateway['gateway_id']);
		
		if (!($oGateway = Phpfox::getLib('gateway')->load($aGateway['gateway_id'], array_merge($_REQUEST, $aGateway))))
		{
			Phpfox::log('Unable to load gateway.');
			Phpfox::getService('api.gateway.process')->addLog($aGateway['gateway_id'], Phpfox::endLog());
			
			return false;
		}
		
		Phpfox::log('Gateway successfully loaded.');
		
		$mReturn = $oGateway->callback();
		
		Phpfox::log('Callback complete');
		
		Phpfox::getService('api.gateway.process')->addLog($aGateway['gateway_id'], Phpfox::endLog());
		
		if ($mReturn == 'redirect')
		{
			Phpfox::getLib('url')->send('');
		}
	}
开发者ID:hoanghd,项目名称:tools,代码行数:49,代码来源:gateway.class.php


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