本文整理汇总了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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}
示例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
}