// @todo Other address fields
function asString()
+ {
+ $xs = new XMLStringer(true);
+ $this->outputTo($xs);
+ return $xs->getString();
+ }
+
+ function outputTo($xo)
{
if (!empty($this->formatted)) {
- $xs = new XMLStringer(true);
- $xs->elementStart('poco:address');
- $xs->element('poco:formatted', null, common_xml_safe_str($this->formatted));
- $xs->elementEnd('poco:address');
- return $xs->getString();
+ $xo->elementStart('poco:address');
+ $xo->element('poco:formatted', null, common_xml_safe_str($this->formatted));
+ $xo->elementEnd('poco:address');
}
-
- return null;
}
}