本文整理汇总了PHP中Aimeos\MShop\Common\Item\Base::fromArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Base::fromArray方法的具体用法?PHP Base::fromArray怎么用?PHP Base::fromArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aimeos\MShop\Common\Item\Base
的用法示例。
在下文中一共展示了Base::fromArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'customer.group.code':
$this->setCode($value);
break;
case 'customer.group.label':
$this->setLabel($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例2: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case $this->prefix . 'parentid':
$this->setParentId($value);
break;
case $this->prefix . 'typeid':
$this->setTypeId($value);
break;
case $this->prefix . 'domain':
$this->setDomain($value);
break;
case $this->prefix . 'refid':
$this->setRefId($value);
break;
case $this->prefix . 'datestart':
$this->setDateStart($value);
break;
case $this->prefix . 'dateend':
$this->setDateEnd($value);
break;
case $this->prefix . 'config':
$this->setConfig($value);
break;
case $this->prefix . 'position':
$this->setPosition($value);
break;
case $this->prefix . 'status':
$this->setStatus($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例3: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'order.base.service.attribute.attrid':
$this->setAttributeId($value);
break;
case 'order.base.service.attribute.parentid':
$this->setParentId($value);
break;
case 'order.base.service.attribute.type':
$this->setType($value);
break;
case 'order.base.service.attribute.name':
$this->setName($value);
break;
case 'order.base.service.attribute.code':
$this->setCode($value);
break;
case 'order.base.service.attribute.value':
$this->setValue($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例4: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'plugin.typeid':
$this->setTypeId($value);
break;
case 'plugin.label':
$this->setLabel($value);
break;
case 'plugin.provider':
$this->setProvider($value);
break;
case 'plugin.config':
$this->setConfig($value);
break;
case 'plugin.status':
$this->setStatus($value);
break;
case 'plugin.position':
$this->setPosition($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例5: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case $this->prefix . 'salutation':
$this->setSalutation($value);
break;
case $this->prefix . 'company':
$this->setCompany($value);
break;
case $this->prefix . 'vatid':
$this->setVatID($value);
break;
case $this->prefix . 'title':
$this->setTitle($value);
break;
case $this->prefix . 'firstname':
$this->setFirstname($value);
break;
case $this->prefix . 'lastname':
$this->setLastname($value);
break;
case $this->prefix . 'address1':
$this->setAddress1($value);
break;
case $this->prefix . 'address2':
$this->setAddress2($value);
break;
case $this->prefix . 'address3':
$this->setAddress3($value);
break;
case $this->prefix . 'postal':
$this->setPostal($value);
break;
case $this->prefix . 'city':
$this->setCity($value);
break;
case $this->prefix . 'state':
$this->setState($value);
break;
case $this->prefix . 'countryid':
$this->setCountryId($value);
break;
case $this->prefix . 'languageid':
$this->setLanguageId($value);
break;
case $this->prefix . 'telephone':
$this->setTelephone($value);
break;
case $this->prefix . 'telefax':
$this->setTelefax($value);
break;
case $this->prefix . 'email':
$this->setEmail($value);
break;
case $this->prefix . 'website':
$this->setWebsite($value);
break;
case $this->prefix . 'flag':
$this->setFlag($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例6: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'locale.currency.id':
$this->setId($value);
break;
case 'locale.currency.code':
$this->setCode($value);
break;
case 'locale.currency.label':
$this->setLabel($value);
break;
case 'locale.currency.status':
$this->setStatus($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例7: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'coupon.config':
$this->setConfig($value);
break;
case 'coupon.label':
$this->setLabel($value);
break;
case 'coupon.datestart':
$this->setDateStart($value);
break;
case 'coupon.dateend':
$this->setDateEnd($value);
break;
case 'coupon.provider':
$this->setProvider($value);
break;
case 'coupon.status':
$this->setStatus($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例8: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
if (isset($list['locale.siteid'])) {
$this->setSiteId($list['locale.siteid']);
}
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'locale.languageid':
$this->setLanguageId($value);
break;
case 'locale.currencyid':
$this->setCurrencyId($value);
break;
case 'locale.position':
$this->setPosition($value);
break;
case 'locale.status':
$this->setStatus($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例9: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'log.facility':
$this->setFacility($value);
break;
case 'log.priority':
$this->setPriority($value);
break;
case 'log.message':
$this->setMessage($value);
break;
case 'log.request':
$this->setRequest($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例10: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'coupon.code.count':
$this->setCount($value);
break;
case 'coupon.code.code':
$this->setCode($value);
break;
case 'coupon.code.parentid':
$this->setParentId($value);
break;
case 'coupon.code.datestart':
$this->setDateStart($value);
break;
case 'coupon.code.dateend':
$this->setDateEnd($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例11: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'order.base.coupon.baseid':
$this->setBaseId($value);
break;
case 'order.base.coupon.productid':
$this->setProductId($value);
break;
case 'order.base.coupon.code':
$this->setCode($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例12: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'cache.id':
$this->setId($value);
break;
case 'cache.value':
$this->setValue($value);
break;
case 'cache.expire':
$this->setTimeExpire($value);
break;
case 'cache.tags':
$this->setTags($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例13: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'tag.typeid':
$this->setTypeId($value);
break;
case 'tag.languageid':
$this->setLanguageId($value);
break;
case 'tag.label':
$this->setLabel($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例14: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'product.stock.warehouse.code':
$this->setCode($value);
break;
case 'product.stock.warehouse.label':
$this->setLabel($value);
break;
case 'product.stock.warehouse.status':
$this->setStatus($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}
示例15: fromArray
/**
* Sets the item values from the given array.
*
* @param array $list Associative list of item keys and their values
* @return array Associative list of keys and their values that are unknown
*/
public function fromArray(array $list)
{
$unknown = array();
$list = parent::fromArray($list);
foreach ($list as $key => $value) {
switch ($key) {
case 'product.stock.parentid':
$this->setParentId($value);
break;
case 'product.stock.warehouseid':
$this->setWarehouseId($value);
break;
case 'product.stock.stocklevel':
$this->setStocklevel($value);
break;
case 'product.stock.dateback':
$this->setDateBack($value);
break;
default:
$unknown[$key] = $value;
}
}
return $unknown;
}