public function __isset($property)
{
- return !empty($this->_properties[$property]);
+ return isset($this->_properties[$property]);
}
/**
} else {
/* Simple type */
if (strlen($this->$map[self::KEY_ATTRIBUTE]) == 0) {
- // Do not output empty items.
- // See above: $encoder->startTag($tag, false, true);
- continue;
+ // Do not output empty items except for the following:
+ if ($this->_checkSendEmpty($tag)) {
+ $encoder->startTag($tag, false, true);
+ } else {
+ continue;
+ }
} else {
$encoder->startTag($tag);
}
}
/**
+ * Checks to see if we should send an empty value.
+ *
+ * @param string $tag The tag name
+ *
+ * @return boolean
+ */
+ protected function _checkSendEmpty($tag)
+ {
+ return false;
+ }
+
+ /**
*
* @param $message
* @return unknown_type