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


PHP QuickBooks_Utilities::constructRequestID方法代码示例

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


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

示例1: _constructRequestID

 /**
  * Create a requestID string from action and ident parts
  * 
  * @param string $action
  * @param mixed $ident
  * @return string
  */
 protected function _constructRequestID($action, $ident)
 {
     return QuickBooks_Utilities::constructRequestID($action, $ident);
 }
开发者ID:dsesar,项目名称:quickbooks-php-devkit,代码行数:11,代码来源:Handlers.php

示例2: callErrorHandler

 /**
  * 
  * 
  * @todo Support for object instance error handlers
  * 
  */
 public static function callErrorHandler($Driver, $errmap, $errnum, $errmsg, $user, $action, $ident, $extra, &$errerr, $xml, $callback_config)
 {
     // $Driver, &$map, $action, $which, $user, $action, $ident, $extra, &$err, $last_action_time, $last_actionident_time, $xml_or_version = '', $qb_identifier_or_locale = array(), $callback_config = array(), $qbxml = null
     // Build the requestID
     $requestID = QuickBooks_Utilities::constructRequestID($action, $ident);
     $callback = '';
     /*if (is_object($this->_instance_onerror) and 
     			method_exists($this->_instance_onerror, 'e' . $errnum))
     		{
     			$func = get_class($this->_instance_onerror) . '->e' . $errnum;
     		}*/
     //else
     if (isset($errmap[$errnum])) {
         $callback = $errmap[$errnum];
     } else {
         if (isset($errmap[$action])) {
             $callback = $errmap[$action];
         } else {
             if (isset($errmap['!'])) {
                 $callback = $errmap['!'];
             } else {
                 if (isset($errmap['*'])) {
                     $callback = $errmap['*'];
                 }
             }
         }
     }
     // Determine the type of hook
     $type = QuickBooks_Callbacks::_type($callback, $Driver, null);
     $vars = array($requestID, $user, $action, $ident, $extra, &$errerr, $xml, $errnum, $errmsg, $callback_config);
     $errerr = '';
     if ($type == QUICKBOOKS_CALLBACKS_TYPE_OBJECT_METHOD) {
         // @todo Finish this!
         return false;
     } else {
         if ($type == QUICKBOOKS_CALLBACKS_TYPE_FUNCTION) {
             // It's a callback FUNCTION
             $Driver->log('Function error handler: ' . $callback, null, QUICKBOOKS_LOG_VERBOSE);
             $errerr = '';
             // This is an error message *returned by* the error handler function
             $continue = QuickBooks_Callbacks::_callFunction($callback, $vars, $errerr, 5);
             //$continue = $func($requestID, $user, $action, $ident, $extra, $errerr, $xml, $errnum, $errmsg, $callback_config);
             if ($errerr) {
                 $Driver->log('Error handler returned an error: ' . $errerr, null, QUICKBOOKS_LOG_NORMAL);
                 return false;
             }
         } else {
             if ($type == QUICKBOOKS_CALLBACKS_TYPE_STATIC_METHOD) {
                 // It's a callback STATIC METHOD
                 //$tmp = explode('::', $func);
                 //$class = trim(current($tmp));
                 //$method = trim(end($tmp));
                 $Driver->log('Static method error handler: ' . $callback, null, QUICKBOOKS_LOG_VERBOSE);
                 $errerr = '';
                 $continue = QuickBooks_Callbacks::_callStaticMethod($callback, $vars, $errerr, 5);
                 if ($errerr) {
                     $Driver->log('Error handler returned an error: ' . $errerr, null, QUICKBOOKS_LOG_NORMAL);
                     return false;
                 }
             } else {
                 return false;
             }
         }
     }
     return $continue;
 }
开发者ID:Edgargm87,项目名称:efapcom,代码行数:72,代码来源:Callbacks.php


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