Move ActivityObject and related stuff to core

This commit is contained in:
Zach Copley
2010-02-22 17:10:50 -08:00
parent a3e800e67c
commit 6a711c6cdc
3 changed files with 6 additions and 96 deletions

View File

@@ -1119,25 +1119,8 @@ class Notice extends Memcached_DataObject
*/
function asActivityNoun($element)
{
$xs = new XMLStringer(true);
$xs->elementStart('activity:' . $element);
$xs->element('activity:object-type',
null,
'http://activitystrea.ms/schema/1.0/note');
$xs->element('id',
null,
$this->uri);
$xs->element('content',
array('type' => 'text/html'),
$this->rendered);
$xs->element('link',
array('type' => 'text/html',
'rel' => 'alternate',
'href' => $this->bestUrl()));
$xs->elementEnd('activity:' . $element);
return $xs->getString();
$noun = ActivityObject::fromNotice($this);
return $noun->asString('activity:' . $element);
}
function bestUrl()