123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- class ActivityStreamsMediaLink extends ActivityStreamsLink
- {
- private $linkDict;
- function __construct(
- $url = null,
- $width = null,
- $height = null,
- $mediaType = null, // extension
- $rel = null, // extension
- $duration = null
- )
- {
- parent::__construct($url, $rel, $mediaType);
- $this->linkDict = array(
- 'width' => intval($width),
- 'height' => intval($height),
- 'duration' => intval($duration)
- );
- }
- function asArray()
- {
- return array_merge(
- parent::asArray(),
- array_filter($this->linkDict)
- );
- }
- }
|