diff options
author | Zach Copley <zach@status.net> | 2010-02-22 17:10:50 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-22 17:10:50 -0800 |
commit | 6a711c6cdc5d1e1b1a64e5858b12e6964a0abe9c (patch) | |
tree | f4ee85621ed4b534f2bb6d7e2ac420ca2fff9cae /classes/Notice.php | |
parent | a3e800e67c8ced785a1ca6c2628cc5116ef44730 (diff) |
Move ActivityObject and related stuff to core
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index a12839d72..ba8646f68 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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() |