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


PHP QuickBooks_Utilities::listObjects方法代码示例

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


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

示例1: actionToObject

 /**
  * Convert a QuickBooks action to a QuickBooks object type (i.e.: QUICKBOOKS_ADD_CUSTOMER gets converted to QUICKBOOKS_OBJECT_CUSTOMER)
  * 
  * @param string $action
  * @return string
  */
 public static function actionToObject($action)
 {
     static $cache = array();
     if (isset($cache[$action])) {
         //print('returning cached [' . $action . ']' . "\n");
         return $cache[$action];
     }
     $types = QuickBooks_Utilities::listObjects(null, false, true);
     foreach ($types as $type) {
         if (QuickBooks_Utilities::fnmatch('*' . $type . '*', $action)) {
             $cache[$action] = $type;
             //print('returning [' . $action . '] => ' . $type . "\n");
             return $type;
         }
     }
     return null;
 }
开发者ID:djeraseit,项目名称:quickbooks-php,代码行数:23,代码来源:Utilities.php

示例2: actionToObject

 /**
  * Convert a QuickBooks action to a QuickBooks object type (i.e.: QUICKBOOKS_ADD_CUSTOMER gets converted to QUICKBOOKS_OBJECT_CUSTOMER)
  * 
  * @param string $action
  * @return string
  */
 public static function actionToObject($action)
 {
     $types = QuickBooks_Utilities::listObjects(null, false, true);
     foreach ($types as $type) {
         if (QuickBooks_Utilities::_fnmatch('*' . $type . '*', $action)) {
             return $type;
         }
     }
     return null;
 }
开发者ID:Edgargm87,项目名称:efapcom,代码行数:16,代码来源:Utilities.php


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