public function setImage($image)
    {
        if ($image instanceof FeedImage) {
            $this->image = $image;
        } elseif (is_array($image)) {
            if (!empty($image)) {
                $this->image = FeedImage::createFromArray($image);
            }
        } elseif (is_null($image)) {
            $this->image = null;
        } else {
            throw new \InvalidArgumentException('Invalid image');
        }

        return $this;
    }
public function setImage($image)
    {
        if ($image instanceof FeedImage) {
            $this->image = $image;
        } elseif (is_array($image)) {
            if (!empty($image)) {
                $this->image = FeedImage::createFromArray($image);
            }
        } elseif (is_null($image)) {
            $this->image = null;
        } else {
            throw new \InvalidArgumentException('Invalid image');
        }

        return $this;
    }
public function setImage ( $ image ) { if ( $ image instanceof FeedImage ) { $ this -> image = $ image ; } elseif ( is_array ( $ image ) ) { if ( ! empty ( $ image ) ) { $ this -> image = FeedImage :: createFromArray ( $ image ) ; } } elseif ( is_null ( $ image ) ) { $ this -> image = null ; } else { throw new \ InvalidArgumentException ( 'Invalid image' ) ; } return $ this ; }
Sets image.

@param FeedImage|array $image

@return Feed

@throws \InvalidArgumentException
Sets image .