function asArray()
 {
     return array_merge(parent::asArray(), array_filter($this->linkDict));
 }
 /**
  * Add a link to the JSON document
  *
  * @param string $url the URL for the link
  * @param string $rel the link relationship
  */
 function addLink($url = null, $rel = null, $mediaType = null)
 {
     $link = new ActivityStreamsLink($url, $rel, $mediaType);
     array_push($this->links, $link->asArray());
 }