Some initial media parsing

- Activity now returns a list of activity objects
- Processing of photo objects
This commit is contained in:
Zach Copley
2010-03-22 18:53:09 -07:00
parent 073e3a1572
commit b8e97ac709
8 changed files with 266 additions and 31 deletions

View File

@@ -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)