diff options
author | Zach Copley <zach@status.net> | 2010-03-22 18:53:09 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-03-22 18:55:17 -0700 |
commit | b8e97ac7098783f0380c7f8f61c20a100e814dc0 (patch) | |
tree | 0ede4a61bcbbcd475ac3d339a08c23d54ef792a9 /lib/activityobject.php | |
parent | 073e3a1572d0cd5934c6578f4245c39e8376351f (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.php | 20 |
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) |