/** * 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; }
/** * 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; }
/** * 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; }