本文整理汇总了PHP中WindowsAzure\Common\Internal\Utilities::addIfNotEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::addIfNotEmpty方法的具体用法?PHP Utilities::addIfNotEmpty怎么用?PHP Utilities::addIfNotEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowsAzure\Common\Internal\Utilities
的用法示例。
在下文中一共展示了Utilities::addIfNotEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toArray
/**
* Converts the current object into ordered array representation.
*
* @return array
*/
protected function toArray()
{
$arr = parent::toArray();
$order = array(Resources::XTAG_NAMESPACE, Resources::XTAG_NAME, Resources::XTAG_LABEL, Resources::XTAG_DESCRIPTION, Resources::XTAG_LOCATION);
Utilities::addIfNotEmpty(Resources::XTAG_NAME, $this->getName(), $arr);
$ordered = Utilities::orderArray($arr, $order);
return $ordered;
}
示例2: toArray
/**
* Converts the current object into array representation.
*
* @return array
*/
protected function toArray()
{
$arr = array();
$arr[Resources::XTAG_NAMESPACE] = array(Resources::WA_XML_NAMESPACE => null);
Utilities::addIfNotEmpty(Resources::XTAG_LABEL, $this->_label, $arr);
Utilities::addIfNotEmpty(Resources::XTAG_DESCRIPTION, $this->_description, $arr);
Utilities::addIfNotEmpty(Resources::XTAG_LOCATION, $this->_location, $arr);
return $arr;
}
示例3: toArray
/**
* Converts the current object into ordered array representation.
*
* @return array
*/
protected function toArray()
{
$arr = parent::toArray();
Utilities::addIfNotEmpty(Resources::XTAG_SERVICE_NAME, $this->getName(), $arr);
Utilities::addIfNotEmpty(Resources::XTAG_AFFINITY_GROUP, $this->getAffinityGroup(), $arr);
return $arr;
}