- foreach ($this->extra as $el) {
- list($extraTag, $attrs, $content) = $el;
- $xo->element($extraTag, $attrs, $content);
+ if (!empty($this->poco)) {
+ $this->poco->outputTo($xo);
+ }
+
+ // @fixme there's no way here to make a tree; elements can only contain plaintext
+ // @fixme these may collide with JSON extensions
+ foreach ($this->extra as $el) {
+ list($extraTag, $attrs, $content) = $el;
+ $xo->element($extraTag, $attrs, $content);
+ }
+
+ Event::handle('EndActivityObjectOutputAtom', array($this, $xo));