4 * A class for representing links in JSON Activities
8 * @author Zach Copley <zach@status.net>
9 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
10 * @link http://status.net/
13 class ActivityStreamsLink
17 function __construct($url = null, $rel = null, $mediaType = null)
19 // links MUST have a URL
21 throw new Exception('Links must have a URL.');
24 $this->linkDict = array(
26 'rel' => $rel, // extension
27 'type' => $mediaType // extension
33 return array_filter($this->linkDict);