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


PHP XMLWriter::endElement方法代码示例

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


在下文中一共展示了XMLWriter::endElement方法的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_customerchargecard');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for update');
     }
     $xml->writeAttribute('recordno', $this->getRecordNo(), true);
     $xml->writeElement('exp_month', $this->getExpirationMonth());
     $xml->writeElement('exp_year', $this->getExpirationYear());
     $xml->writeElement('description', $this->getDescription());
     if ($this->isActive() === true) {
         $xml->writeElement('status', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('status', 'inactive');
     }
     if ($this->getAddressLine1() || $this->getAddressLine2() || $this->getCity() || $this->getStateProvince() || $this->getZipPostalCode() || $this->getCountry()) {
         $xml->startElement('mailaddress');
         $xml->writeElement('address1', $this->getAddressLine1());
         $xml->writeElement('address2', $this->getAddressLine2());
         $xml->writeElement('city', $this->getCity());
         $xml->writeElement('state', $this->getStateProvince());
         $xml->writeElement('zip', $this->getZipPostalCode());
         $xml->writeElement('country', $this->getCountry());
         $xml->endElement();
         //mailaddress
     }
     $xml->writeElement('defaultcard', $this->isDefaultCard());
     $xml->writeElement('usebilltoaddr', $this->isBillToContactAddressUsedForVerification());
     $xml->endElement();
     //update_customerchargecard
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:41,代码来源:CustomerChargeCardUpdate.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('APACCOUNTLABEL');
     if (!$this->getAccountLabel()) {
         throw new InvalidArgumentException('Account Label is required for create');
     }
     $xml->writeElement('ACCOUNTLABEL', $this->getAccountLabel(), true);
     if (!$this->getDescription()) {
         throw new InvalidArgumentException('Description is required for create');
     }
     $xml->writeElement('DESCRIPTION', $this->getDescription(), true);
     if (!$this->getGlAccountNo()) {
         throw new InvalidArgumentException('GL Account is required for create');
     }
     $xml->writeElement('GLACCOUNTNO', $this->getGlAccountNo(), true);
     $xml->writeElement('OFFSETGLACCOUNTNO', $this->getOffsetGlAccountNo());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $xml->endElement();
     //APACCOUNTLABEL
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:37,代码来源:ApAccountLabelCreate.php

示例3: 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

示例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_aradjustmentbatch');
     if (!$this->getTitle()) {
         throw new InvalidArgumentException('Title is required for create');
     }
     $xml->writeElement('batchtitle', $this->getTitle(), true);
     if (!$this->getGlPostingDate()) {
         throw new InvalidArgumentException('GL Posting Date is required for create');
     }
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getGlPostingDate(), true);
     $xml->endElement();
     //datecreated
     /*if (count($this->getApAdjustments()) > 0) {
           foreach ($this->getApAdjustments() as $apAdjustment) {
               $bill->writeXml($xml);
           }
       }*/
     $xml->endElement();
     //create_aradjustmentbatch
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:32,代码来源:ArAdjustmentSummaryCreate.php

示例5: writeXml

 /**
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_arpayment');
     if (!$this->getCustomerId()) {
         throw new InvalidArgumentException('Customer ID is required for create');
     }
     $xml->writeElement('customerid', $this->getCustomerId(), true);
     $xml->writeElement('paymentamount', $this->getTransactionPaymentAmount(), true);
     $xml->writeElement('translatedamount', $this->getBasePaymentAmount());
     if ($this->getUndepositedFundsGlAccountNo()) {
         $xml->writeElement('undepfundsacct', $this->getUndepositedFundsGlAccountNo());
     } elseif ($this->getBankAccountId()) {
         $xml->writeElement('bankaccountid', $this->getBankAccountId());
     }
     $xml->writeElement('refid', $this->getReferenceNumber());
     $xml->writeElement('overpaylocid', $this->getOverpaymentLocationId());
     $xml->writeElement('overpaydeptid', $this->getOverpaymentDepartmentId());
     if (!$this->getReceivedDate()) {
         throw new InvalidArgumentException('Received Date is required for create');
     }
     $xml->startElement('datereceived');
     $xml->writeDateSplitElements($this->getReceivedDate(), true);
     $xml->endElement();
     //datereceived
     if (!$this->getPaymentMethod()) {
         throw new InvalidArgumentException('Payment Method is required for create');
     }
     $xml->writeElement('paymentmethod', $this->getPaymentMethod(), true);
     $xml->writeElement('basecurr', $this->getBaseCurrency());
     $xml->writeElement('currency', $this->getTransactionCurrency());
     if ($this->getExchangeRateDate()) {
         $xml->startElement('exchratedate');
         $xml->writeDateSplitElements($this->getExchangeRateDate(), true);
         $xml->endElement();
     }
     if ($this->getExchangeRateType()) {
         $xml->writeElement('exchratetype', $this->getExchangeRateType());
     } elseif ($this->getExchangeRateValue()) {
         $xml->writeElement('exchrate', $this->getExchangeRateValue());
     } elseif ($this->getBaseCurrency() || $this->getTransactionCurrency()) {
         $xml->writeElement('exchratetype', $this->getExchangeRateType(), true);
     }
     $xml->writeElement('cctype', $this->getCreditCardType());
     $xml->writeElement('authcode', $this->getAuthorizationCode());
     if (count($this->getApplyToTransactions()) > 0) {
         foreach ($this->getApplyToTransactions() as $applyToTransaction) {
             $applyToTransaction->writeXml($xml);
         }
     }
     //TODO online payment methods
     $xml->endElement();
     //create_arpayment
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:61,代码来源:ArPaymentCreate.php

示例6: 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

示例7: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getDdsObjects');
     $xml->endElement();
     //getDdsObjects
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:15,代码来源:DdsObjectRead.php

示例8: writeXml

 /**
  * Write the getUserPermissions block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getUserPermissions');
     $xml->writeElement('userId', $this->getUserId(), true);
     $xml->endElement();
     //getUserPermissions
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:16,代码来源:UserPermissionsRead.php

示例9: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getDdsDdl');
     $xml->writeElement('object', $this->getObjectName(), true);
     $xml->endElement();
     //getDdsDdl
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:16,代码来源:DdsObjectDdlRead.php

示例10: 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

示例11: writeXml

 /**
  * Write the inspect block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('inspect');
     $xml->writeAttribute('detail', $this->writeXmlShowDetail());
     $xml->writeElement('object', $this->getObjectName(), true);
     $xml->endElement();
     //inspect
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:17,代码来源:Inspect.php

示例12: 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_supdocfolder');
     if (!$this->getFolderName()) {
         throw new InvalidArgumentException('Attachments Folder Name is required for delete');
     }
     $xml->writeAttribute('key', $this->getFolderName());
     $xml->endElement();
     //delete_supdocfolder
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:20,代码来源:AttachmentsFolderDelete.php

示例13: 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_customerchargecard');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for delete');
     }
     $xml->writeAttribute('recordno', $this->getRecordNo());
     $xml->endElement();
     //delete_customerchargecard
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:20,代码来源:CustomerChargeCardDelete.php

示例14: writeXml

 /**
  * Write the readMore block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('readMore');
     if (!$this->getResultId()) {
         throw new InvalidArgumentException('Result ID is required for read more');
     }
     $xml->writeElement('resultId', $this->getResultId(), true);
     $xml->endElement();
     //readMore
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:19,代码来源:ReadMore.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_contact');
     if (!$this->getContactName()) {
         throw new InvalidArgumentException('Contact Name is required for delete');
     }
     $xml->writeAttribute('contactname', $this->getContactName());
     $xml->endElement();
     //delete_contact
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:20,代码来源:ContactDelete.php


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