當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XMLWriter::writeElement方法代碼示例

本文整理匯總了PHP中Intacct\Xml\XMLWriter::writeElement方法的典型用法代碼示例。如果您正苦於以下問題:PHP XMLWriter::writeElement方法的具體用法?PHP XMLWriter::writeElement怎麽用?PHP XMLWriter::writeElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Intacct\Xml\XMLWriter的用法示例。


在下文中一共展示了XMLWriter::writeElement方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('update_supdoc');
     if (!$this->getAttachmentsId()) {
         throw new InvalidArgumentException('Attachments ID is required for update');
     }
     $xml->writeElement('supdocid', $this->getAttachmentsId(), true);
     $xml->writeElement('supdocname', $this->getAttachmentsName());
     $xml->writeElement('supdocfoldername', $this->getAttachmentFolderName());
     $xml->writeElement('supdocdescription', $this->getDescription());
     if (count($this->getFiles()) > 0) {
         $xml->startElement('attachments');
         foreach ($this->getFiles() as $file) {
             if ($file instanceof AttachmentInterface) {
                 $file->writeXml($xml);
             }
         }
         $xml->endElement();
         //attachments
     }
     $xml->endElement();
     //update_supdoc
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:33,代碼來源:AttachmentsUpdate.php

示例2: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create');
     $xml->startElement('TIMESHEET');
     if (!$this->getEmployeeId()) {
         throw new InvalidArgumentException('Employee ID is required for create');
     }
     $xml->writeElement('EMPLOYEEID', $this->getEmployeeId(), true);
     if (!$this->getBeginDate()) {
         throw new InvalidArgumentException('Begin Date is required for create');
     }
     $xml->writeElement('BEGINDATE', $this->getBeginDate(), true);
     $xml->writeElement('DESCRIPTION', $this->getDescription());
     $xml->writeElement('SUPDOCID', $this->getAttachmentsId());
     $xml->writeElement('STATE', $this->getAction());
     $xml->startElement('TIMESHEETENTRIES');
     if (count($this->getEntries()) > 0) {
         foreach ($this->getEntries() as $entry) {
             $entry->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('Timesheet must have at least 1 entry');
     }
     $xml->endElement();
     //TIMESHEETENTRIES
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //TIMESHEET
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:41,代碼來源:TimesheetCreate.php

示例3: writeXml

 /**
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('apply_arpayment');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for apply');
     }
     $xml->writeElement('arpaymentkey', $this->getRecordNo(), true);
     if (!$this->getReceivedDate()) {
         throw new InvalidArgumentException('Received Date is required for apply');
     }
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getReceivedDate(), true);
     $xml->endElement();
     //paymentdate
     $xml->writeElement('batchkey', $this->getSummaryRecordNo());
     $xml->writeElement('overpaylocid', $this->getOverpaymentLocationId());
     $xml->writeElement('overpaydeptid', $this->getOverpaymentDepartmentId());
     if (count($this->getApplyToTransactions()) > 0) {
         $xml->startElement('arpaymentitems');
         foreach ($this->getApplyToTransactions() as $applyToTransaction) {
             $applyToTransaction->writeXml($xml);
         }
         $xml->endElement();
         //arpaymentitems
     }
     $xml->endElement();
     //apply_arpayment
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:36,代碼來源:ArPaymentApply.php

示例4: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_arpaymentbatch');
     if (!$this->getTitle()) {
         throw new InvalidArgumentException('Title is required for create');
     }
     $xml->writeElement('batchtitle', $this->getTitle(), true);
     if ($this->getUndepositedFundsGlAccountNo()) {
         $xml->writeElement('undepfundsacct', $this->getUndepositedFundsGlAccountNo());
     } elseif ($this->getBankAccountId()) {
         $xml->writeElement('bankaccountid', $this->getBankAccountId());
     }
     if (!$this->getGlPostingDate()) {
         throw new InvalidArgumentException('GL Posting Date is required for create');
     }
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getGlPostingDate(), true);
     $xml->endElement();
     //datecreated
     $xml->endElement();
     //create_arpaymentbatch
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:32,代碼來源:ArPaymentSummaryCreate.php

示例5: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_supdoc');
     // Attachments ID is not required if auto-numbering is configured in module
     $xml->writeElement('supdocid', $this->getAttachmentsId(), true);
     // System sets value to 'Unnamed' if left null
     $xml->writeElement('supdocname', $this->getAttachmentsName(), true);
     if (!$this->getAttachmentFolderName()) {
         // System does not pick up user preferences for default folder
         // Nor does it pick up user's related employee default folder
         throw new InvalidArgumentException('Attachment Folder Name is required for create');
     }
     $xml->writeElement('supdocfoldername', $this->getAttachmentFolderName(), true);
     $xml->writeElement('supdocdescription', $this->getDescription());
     if (count($this->getFiles()) > 0) {
         $xml->startElement('attachments');
         foreach ($this->getFiles() as $file) {
             if ($file instanceof AttachmentInterface) {
                 $file->writeXml($xml);
             }
         }
         $xml->endElement();
         //attachments
     }
     $xml->endElement();
     //create_supdoc
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:37,代碼來源:AttachmentsCreate.php

示例6: writeXml

 /**
  * Write the arpaymentitem block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('arpaymentitem');
     $xml->writeElement('invoicekey', $this->getApplyToRecordId(), true);
     $xml->writeElement('amount', $this->getAmountToApply(), true);
     $xml->endElement();
     //arpaymentitem
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:13,代碼來源:ArPaymentItem.php

示例7: writeXml

 /**
  * Write the parameter block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('parameter');
     $xml->writeElement('name', $this->getName(), true);
     $xml->writeElement('value', $this->getValue(), true);
     $xml->endElement();
     //parameter
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:13,代碼來源:AdditionalParameter.php

示例8: writeXml

 /**
  * Write the paymentrequestitem block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('eppaymentrequestitem');
     $xml->writeElement('key', $this->getApplyToRecordId(), true);
     $xml->writeElement('paymentamount', $this->getAmountToApply(), true);
     $xml->writeElement('credittoapply', $this->getCreditToApply());
     $xml->endElement();
     //eppaymentrequestitem
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:14,代碼來源:ReimbursementRequestItem.php

示例9: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('record_otherreceipt');
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getTransactionDate());
     $xml->endElement();
     //paymentdate
     $xml->writeElement('payee', $this->getPayer(), true);
     $xml->startElement('receiveddate');
     $xml->writeDateSplitElements($this->getReceiptDate());
     $xml->endElement();
     //receiveddate
     $xml->writeElement('paymentmethod', $this->getPaymentMethod(), true);
     if ($this->getBankAccountId() || $this->getDepositDate()) {
         $xml->writeElement('bankaccountid', $this->getBankAccountId(), true);
         if ($this->getDepositDate()) {
             $xml->startElement('depositdate');
             $xml->writeDateSplitElements($this->getDepositDate(), true);
             $xml->endElement();
             //depositdate
         }
     } else {
         $xml->writeElement('undepglaccountno', $this->getUndepositedFundsGlAccountNo(), true);
     }
     $xml->writeElement('refid', $this->getTransactionNo());
     $xml->writeElement('description', $this->getDescription());
     $xml->writeElement('supdocid', $this->getAttachmentsId());
     $xml->writeElement('currency', $this->getTransactionCurrency());
     if ($this->getExchangeRateValue()) {
         $xml->writeElement('exchrate', $this->getExchangeRateValue());
     } elseif ($this->getExchangeRateDate() || $this->getExchangeRateType()) {
         if ($this->getExchangeRateDate()) {
             $xml->startElement('exchratedate');
             $xml->writeDateSplitElements($this->getExchangeRateDate(), true);
             $xml->endElement();
         }
         $xml->writeElement('exchratetype', $this->getExchangeRateType(), true);
     }
     $this->writeXmlExplicitCustomFields($xml);
     $xml->startElement('receiptitems');
     if (count($this->getLines()) > 0) {
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('CM Other Receipt must have at least 1 line');
     }
     $xml->endElement();
     //receiptitems
     $xml->endElement();
     //record_otherreceipt
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:62,代碼來源:OtherReceiptCreate.php

示例10: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create');
     $xml->startElement('GLBATCH');
     $xml->writeElement('JOURNAL', $this->getJournalSymbol(), true);
     $xml->writeElement('BATCH_DATE', $this->getPostingDate(), true);
     $xml->writeElement('REVERSEDATE', $this->getReverseDate());
     $xml->writeElement('BATCH_TITLE', $this->getDescription(), true);
     $xml->writeElement('HISTORY_COMMENT', $this->getHistoryComment());
     $xml->writeElement('REFERENCENO', $this->getReferenceNumber());
     $xml->writeElement('BASELOCATION_NO', $this->getSourceEntityId());
     $xml->writeElement('SUPDOCID', $this->getAttachmentsId());
     $xml->writeElement('STATE', $this->getAction());
     $this->writeXmlImplicitCustomFields($xml);
     $xml->startElement('ENTRIES');
     if (count($this->getLines()) >= 2) {
         foreach ($this->getLines() as $entry) {
             $entry->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('Journal Entry must have at least 2 lines');
     }
     $xml->endElement();
     //ENTRIES
     $xml->endElement();
     //GLBATCH
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:39,代碼來源:JournalEntryCreate.php

示例11: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getObjectTrail');
     $xml->writeElement('object', $this->getObjectName(), true);
     $xml->writeElement('objectKey', $this->getObjectKey(), true);
     $xml->endElement();
     //getObjectTrail
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:17,代碼來源:AuditTrailRead.php

示例12: writeXml

 /**
  * Write the operation block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(&$xml)
 {
     $xml->startElement('authentication');
     $xml->startElement('login');
     $xml->writeElement('userid', $this->userId, true);
     $xml->writeElement('companyid', $this->companyId, true);
     $xml->writeElement('password', $this->password, true);
     $xml->endElement();
     //login
     $xml->endElement();
     //authentication
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:17,代碼來源:LoginAuthentication.php

示例13: writeXml

 /**
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('ictransitem');
     $xml->writeElement('itemid', $this->getItemId(), true);
     $xml->writeElement('itemdesc', $this->getItemDescription());
     $xml->writeElement('warehouseid', $this->getWarehouseId());
     $xml->writeElement('quantity', $this->getQuantity(), true);
     $xml->writeElement('unit', $this->getUnit());
     $xml->writeElement('cost', $this->getCost());
     $xml->writeElement('locationid', $this->getLocationId());
     $xml->writeElement('departmentid', $this->getDepartmentId());
     if (count($this->getItemDetails()) > 0) {
         $xml->startElement('itemdetails');
         foreach ($this->getItemDetails() as $itemDetail) {
             $itemDetail->writeXml($xml);
         }
         $xml->endElement();
         //itemdetails
     }
     $this->writeXmlExplicitCustomFields($xml);
     $xml->writeElement('projectid', $this->getProjectId());
     $xml->writeElement('customerid', $this->getCustomerId());
     $xml->writeElement('vendorid', $this->getVendorId());
     $xml->writeElement('employeeid', $this->getEmployeeId());
     $xml->writeElement('classid', $this->getClassId());
     $xml->writeElement('contractid', $this->getContractId());
     $xml->endElement();
     //ictransitem
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:32,代碼來源:InventoryTransactionLineCreate.php

示例14: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('csnentity');
     if (!$this->getEntityId()) {
         throw new InvalidArgumentException('Entity ID is required to consolidate an entity');
     }
     $xml->writeElement('entityid', $this->getEntityId(), true);
     // Rates support up to 10 decimal places
     $bsRate = is_float($this->getEndingSpotRate()) ? number_format($this->getEndingSpotRate(), 10) : $this->getEndingSpotRate();
     $waRate = is_float($this->getWeightedAverageRate()) ? number_format($this->getWeightedAverageRate(), 10) : $this->getWeightedAverageRate();
     $xml->writeElement('bsrate', $bsRate);
     $xml->writeElement('warate', $waRate);
     $xml->endElement();
     //csnentity
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:20,代碼來源:ConsolidationEntity.php

示例15: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('delete');
     $xml->writeElement('object', 'WAREHOUSE');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for delete');
     }
     $xml->writeElement('keys', $this->getRecordNo());
     $xml->endElement();
     //delete
     $xml->endElement();
     //function
 }
開發者ID:Intacct,項目名稱:intacct-sdk-php,代碼行數:21,代碼來源:WarehouseDelete.php


注:本文中的Intacct\Xml\XMLWriter::writeElement方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。