activity/object/object.php
public function setAttachments(array $attachments, $merge = true)
    {
        if ($merge) {
            $this->attachments = array_merge($this->attachments, $attachments);
        } else {
            $this->attachments = $attachments;
        }

        return $this;
    }
public function setAttachments(array $attachments, $merge = true)
    {
        if ($merge) {
            $this->attachments = array_merge($this->attachments, $attachments);
        } else {
            $this->attachments = $attachments;
        }

        return $this;
    }
public function setAttachments ( array $ attachments , $ merge = true ) { if ( $ merge ) { $ this -> attachments = array_merge ( $ this -> attachments , $ attachments ) ; } else { $ this -> attachments = $ attachments ; } return $ this ; }
Set the attachments.

@link http://activitystrea.ms/specs/json/1.0/#object See attachments property.

@param array $attachments An array of {@link ComActivitiesActivityObjectInterface} objects.
@param bool  $merge       Tells if attachments should be replaced or merged with current existing attachments.

@return ComActivitiesActivityObject
Set the attachments .