summaryrefslogtreecommitdiff
path: root/lib/activityobject.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-22 18:53:09 -0700
committerZach Copley <zach@status.net>2010-03-22 18:55:17 -0700
commitb8e97ac7098783f0380c7f8f61c20a100e814dc0 (patch)
tree0ede4a61bcbbcd475ac3d339a08c23d54ef792a9 /lib/activityobject.php
parent073e3a1572d0cd5934c6578f4245c39e8376351f (diff)
Some initial media parsing
- Activity now returns a list of activity objects - Processing of photo objects
Diffstat (limited to 'lib/activityobject.php')
-rw-r--r--lib/activityobject.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/activityobject.php b/lib/activityobject.php
index 0a358ccab..34d1b9170 100644
--- a/lib/activityobject.php
+++ b/lib/activityobject.php
@@ -100,6 +100,13 @@ class ActivityObject
public $poco;
public $displayName;
+ // @todo move this stuff to it's own PHOTO activity object
+ const MEDIA_DESCRIPTION = 'description';
+
+ public $thumbnail;
+ public $largerImage;
+ public $description;
+
/**
* Constructor
*
@@ -150,6 +157,19 @@ class ActivityObject
$this->poco = new PoCo($element);
}
+
+ if ($this->type == self::PHOTO) {
+
+ $this->thumbnail = ActivityUtils::getLink($element, 'preview');
+ $this->largerImage = ActivityUtils::getLink($element, 'enclosure');
+
+ $this->description = ActivityUtils::childContent(
+ $element,
+ ActivityObject::MEDIA_DESCRIPTION,
+ Activity::MEDIA
+ );
+
+ }
}
private function _fromAuthor($element)