本文整理汇总了PHP中Phpfox::startLog方法的典型用法代码示例。如果您正苦于以下问题:PHP Phpfox::startLog方法的具体用法?PHP Phpfox::startLog怎么用?PHP Phpfox::startLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phpfox
的用法示例。
在下文中一共展示了Phpfox::startLog方法的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('');
}
}
示例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('');
}
}