本文整理匯總了PHP中Miva\Provisioning\Builder\SimpleXMLElement類的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleXMLElement類的具體用法?PHP SimpleXMLElement怎麽用?PHP SimpleXMLElement使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了SimpleXMLElement類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <AttributeTemplate_Add code="spikes-armor" prompt="Armor Spikes" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<AttributeTemplate_Add />');
$xmlObject->addAttribute('code', $this->getCode());
$xmlObject->addAttribute('prompt', $this->getPrompt());
return $xmlObject;
}
示例2: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <ImageType_Add>
* <Code>type_1</Code>
* <Description>this is the description for type_1</Description>
* </ImageType_Add>
*
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<ImageType_Add></ImageType_Add>');
$xmlObject->addChild('Code', $this->getCode());
$xmlObject->addChild('Description', $this->getDescription());
return $xmlObject;
}
示例3: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <Order_Delete_Item order_id="1000" line_id="1000" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<Order_Delete_Item />');
$xmlObject->addAttribute('order_id', $this->getOrderId());
$xmlObject->addAttribute('line_id', $this->getLineId());
return $xmlObject;
}
示例4: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <ProductAttribute_Delete product_code="chest" attribute_code="bar" />
*
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<ProductAttribute_Delete />');
$xmlObject->addAttribute('product_code', $this->getProductCode());
$xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
return $xmlObject;
}
示例5: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <Attribute_Boolean attribute_code="text" present="true"/>
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<Attribute_Boolean />');
$xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
$xmlObject->addAttribute('present', $this->getPresent() ? 'true' : 'false');
return $xmlObject;
}
示例6: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <ShippingMethod module_code="upsxml" method_code="02" />
*
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<ShippingMethod />');
$xmlObject->addAttribute('module_code', $this->getModuleCode());
$xmlObject->addAttribute('method_code', $this->getMethodCode());
return $xmlObject;
}
示例7: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <CouponCustomer_Assign coupon_code="xxx" customer_login="yyy" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<CouponCustomer_Assign />');
$xmlObject->addAttribute('coupon_code', $this->getCouponCode());
$xmlObject->addAttribute('customer_login', $this->getCustomerLogin());
return $xmlObject;
}
示例8: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <CategoryProduct_Assign category_code="Food" product_code="ale-gallon" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<CategoryProduct_Assign />');
$xmlObject->addAttribute('category_code', $this->getCategoryCode());
$xmlObject->addAttribute('product_code', $this->getProductCode());
return $xmlObject;
}
示例9: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <Attribute_Option attribute_code="select" option_code="s1" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<Attribute_Option />');
$xmlObject->addAttribute('attribute_code', $this->getAttributeCode());
$xmlObject->addAttribute('option_code', $this->getOptionCode());
return $xmlObject;
}
示例10: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <Item code="product_display">
* <ImageDimensions constrain="no"/>
* </Item>
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<Item />');
$xmlObject->addAttribute('code', $this->getCode());
XmlHelper::appendArrayToParent($xmlObject, $this->getData());
return $xmlObject;
}
示例11: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <ProductKit_Generate_Variants product_code="test" pricing_method="master"/>
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<ProductKit_Generate_Variants />');
$xmlObject->addAttribute('product_code', $this->getProductCode());
$xmlObject->addAttribute('pricing_method', $this->getPricingMethod());
return $xmlObject;
}
示例12: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <MivaMailerSettings_Update>
* <Account/>
* <Server/>
* </MivaMailerSettings_Update>
*
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<MivaMailerSettings_Update></MivaMailerSettings_Update>');
$xmlObject->addChild('Account', $this->getAccount());
$xmlObject->addChild('Server', $this->getServer());
return $xmlObject;
}
示例13: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <UpsellSettings_Update>
* <ProductsToShow>3</ProductsToShow>
* <MaxProductsToSelect>3</MaxProductsToSelect>
* </UpsellSettings_Update>
*
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<UpsellSettings_Update />');
$xmlObject->addChild('ProductsToShow', $this->getProductsToShow());
$xmlObject->addChild('MaxProductsToSelect', $this->getMaxProductsToSelect());
return $xmlObject;
}
示例14: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <AvailabilityGroupProduct_Assign group_name="Thief" product_code="kit-disguise" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<AvailabilityGroupCustomer_Assign />');
$xmlObject->addAttribute('group_name', $this->getGroupName());
$xmlObject->addAttribute('product_code', $this->getProductCode());
return $xmlObject;
}
示例15: toXml
/**
* {@inheritDoc}
*
* Format:
*
* <ProductRelatedProduct_Unassign product_code="bolts" relatedproduct_code="bolts-silver" />
*/
public function toXml($version = Version::CURRENT, array $options = array())
{
$xmlObject = new SimpleXMLElement('<ProductRelatedProduct_Unassign />');
$xmlObject->addAttribute('product_code', $this->getProductCode());
$xmlObject->addAttribute('relatedproduct_code', $this->getRelatedProductCode());
return $xmlObject;
}