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


PHP QuickBooks_Utilities::objectToXMLElement方法代码示例

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


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

示例1: TxnDelResponse

 /**
  * 
  * 
  * 
  */
 public static function TxnDelResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array())
 {
     $Driver = QuickBooks_Driver_Singleton::getInstance();
     $Parser = new QuickBooks_XML_Parser($xml);
     $errnum = 0;
     $errmsg = '';
     $Doc = $Parser->parse($errnum, $errmsg);
     $Root = $Doc->getRoot();
     $List = $Root->getChildAt('QBXML QBXMLMsgsRs TxnDelRs');
     $Node = $List;
     if ($errnum == 0) {
         $map = array();
         $others = array();
         QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::objectToXMLElement($extra['objectType'])), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others);
         $sqlObject = new QuickBooks_SQL_Object($map[0], trim(QuickBooks_Utilities::objectToXMLElement($extra['objectType'])));
         $table = $sqlObject->table();
         $multipart = array("TxnID" => $Node->getChildDataAt("TxnDelRs TxnID"));
         //$config['delete'] =
         //Check the delete mode and if desired, just flag them rather than remove the rows.
         // @todo Fix this wrong delete flag field
         //mysql_query("UPDATE qb_bill SET qbsql_to_delete = 0, qbsql_flag_deleted = 1 WHERE TxnID = '" . $Node->getChildDataAt('TxnDelRs TxnID') . "' LIMIT 1");
         /*
         if (isset($config['delete']) and
         	 $config['delete'] == QUICKBOOKS_SERVER_SQL_DELETE_FLAG)
         {
         	//@todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant,
         	//      in case the sql driver used uses something other than 1 and 0.
         	$sqlObject->set(QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG, 1);
         	$sqlObject->set("TxnID", $Node->getChildDataAt("TxnDelRs TxnID"));
         	$Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $sqlObject, array( $multipart ));
         	//Now Delete/Flag all the children.
         	QuickBooks_Callbacks_SQL_Callbacks::_DeleteChildren($table, $user, $action, $ID, $sqlObject, $extra, $config, true, true);
         }
         else
         {
         	//Otherwise we actually remove the rows.
         	$Driver->delete(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, array( $multipart ));
         	$sqlObject->set("TxnID", $Node->getChildDataAt("TxnDelRs TxnID"));
         	//Now Delete/Flag all the children.
         	QuickBooks_Callbacks_SQL_Callbacks::_DeleteChildren($table, $user, $action, $ID, $sqlObject, $extra, $config, true, true);
         }
         */
     }
     return true;
 }
开发者ID:djeraseit,项目名称:quickbooks-php,代码行数:50,代码来源:Callbacks.php


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