public function addAction($action)
    {
        if ($action instanceof AttachmentAction) {
            $this->actions[] = $action;

            return $this;
        } elseif (is_array($action)) {
            $this->actions[] = new AttachmentAction($action);

            return $this;
        }

        throw new InvalidArgumentException('The attachment action must be an instance of jeremykenedy\Slack\AttachmentAction or a keyed array');
    }
public function addAction($action)
    {
        if ($action instanceof AttachmentAction) {
            $this->actions[] = $action;

            return $this;
        } elseif (is_array($action)) {
            $this->actions[] = new AttachmentAction($action);

            return $this;
        }

        throw new InvalidArgumentException('The attachment action must be an instance of jeremykenedy\Slack\AttachmentAction or a keyed array');
    }
public function addAction ( $ action ) { if ( $ action instanceof AttachmentAction ) { $ this -> actions [ ] = $ action ; return $ this ; } elseif ( is_array ( $ action ) ) { $ this -> actions [ ] = new AttachmentAction ( $ action ) ; return $ this ; } throw new InvalidArgumentException ( 'The attachment action must be an instance of jeremykenedy\Slack\AttachmentAction or a keyed array' ) ; }
Add an action to the attachment.

@param mixed $action
@return $this
Add an action to the attachment .