Add photo to collection

@param Offer|array $offer

@return Offers
504016
public function add($offer)
    {
        if (is_array($offer)) {
            $this->collection[] = new Offer($offer);
        } elseif (is_object($offer) && $offer instanceof Offer) {
            $this->collection[] = $offer;
        }

        return $this;
    }
1193706
public function addOption($description, $option = null)
    {
        if ($option) {
            $this->options[$option] = $description;
        } else {
            $this->options[] = $description;
        }

        return $this;
    }
232629
public function addImage($image, $desc = null, $title = null)
    {
        return $this->addAttachment($desc, $title, $image);
    }
367187
public function addNewImage(Input $image)
    {
        $data = [];

        $data['data'] = [
            'image' => $this->generateImageAddress($image->getImage(), $image->getImageMethod()),
        ];

        if ($image->getId()) {
            $data = $this->addImageId($data, $image->getId());
        }

        if ($image->getCrop()) {
            $data['data']['image'] = $this->addImageCrop($data['data']['image'], $image->getCrop());
        }

        if ($image->getConcepts()) {
            $data['data'] = $this->addImageConcepts($data['data'], $image->getConcepts());
        }

        if ($image->getMetaData()) {
            $data['data'] = $this->addImageMetadata($data['data'], $image->getMetaData());
        }

        return $data;
    }
563332
public function addCollection($title)
    {
        $collections = $this->getCollections();

        /** @var Collection $collection */
        $collection = $this->getExtensions()->createElement($this, 'app:collection');
        $collection->addTitle($title);

        $collections[] = $collection;
        $this->setCachedProperty('collections', $collections);

        return $collection;
    }
332701
def _add_photo(self, card, name):
        """"""
        try:
            photo_file = join(dirname(self._filename), 'photo/%s.jpeg' % name)
            jpeg = open(photo_file, 'rb').read()
            photo = card.add('photo')
            photo.type_param = 'jpeg'
            photo.encoding_param = 'b'
            photo.value = jpeg
        except IOError:
            pass
622108
public function add($attribute, ...$values)
    {
        foreach ($values as $value) {
            if ($this->has($attribute)) {
                $attribute = $this->resolveAttributeName($attribute);
                $this->attributes[$attribute] = $this->addAttributeValue($this->attributes[$attribute], $value);
            } else {
                $this->attributes[$attribute] = $value;
            }
            $this->batches->add(new Batch(Batch::TYPE['ADD'], $attribute, $value));
        }

        return $this;
    }
1044894
def create(cls, photo, title, description=''):
        
        if not isinstance(photo, Photo):
            raise TypeError, "Photo expected"
        
        method = 'flickr.photosets.create'
        data = _dopost(method, auth=True, title=title,\
                       description=description,\
                       primary_photo_id=photo.id)
        
        set = Photoset(data.rsp.photoset.id, title, Photo(photo.id),
                       photos=1, description=description)
        return set
771629
public function attachImagesToWidget(Request $request): AttachImagesToWidgetResponseContract
    {
        $widgetID = (int) $request->get('widgetID');
        $widgetType = $request->get('material_type');

        $this->services['widgets']->attachImagesToWidget($widgetID, $widgetType);

        return app()->makeWith('InetStudio\Widgets\Contracts\Http\Responses\Back\GalleryWidgets\AttachImagesToWidgetResponseContract', [
            'result' => [
                'success' => true,
            ],
        ]);
    }
516939
public function collection(Collection $collection)
    {
        $entries = new Entries();

        foreach ($collection as $product) {
            $entry = new Entry($product);

            $entry
                ->field('id')
                ->field('name')
                ->field('description')
                ->field('sku')
                ->field('status')
                ->field('price')
                ->field('sale_price')
                ->field('quantity')

                ->value('image', $product->product->defaultImage())
                // ->relationshipField('product', 'Subbly\\Presenter\\V1\\ProductPresenter')

                ->dateField('created_at')
                ->dateField('updated_at')
            ;

            $entries->addEntry($entry);
        }

        return $entries->toArray();
    }
765502
public function addImage( $key, $location, $caption = '', $geolocation = '', $title = '', $license = '' )
    {
        /**
         * @var \Lti\Sitemap\SitemapUrl $node
         */
        $node = $this->get( $key );
        if ( ! is_null( $node )) {
            $node->addImage( new SitemapImage( $location, $caption, $geolocation, $title, $license ) );
            $this->hasImages = true;
        }
    }
949021
public function addPicture(\Dacorp\ExtraBundle\Entity\DacorpMedia $pictures)
    {
        $this->pictures[] = $pictures;
    
        return $this;
    }
34345
public Offer get(Offer offer) {
        return RestfulUtils.show(OfferService.PATH, offer, Offer.class, super.httpClient);
    }
297234
private void offerNextImage() {
        if (oadState == OADState.OFFERING_IMAGES) {
            try {
                currentImage = firmwareBundle.getNextImage();
                if (currentImage != null) {
                    Log.i(TAG, "Offering image: " + currentImage.name());
                    writeToCharacteristic(oadIdentify, currentImage.metadata());
                }
            } catch (OADException e) {
                // This gets thrown if the firmware bundle is "exhausted", meaning the Bean
                // has rejected all of the images in the bundle
                Log.e(TAG, e.getMessage());
                fail(BeanError.BEAN_REJECTED_FW);
            }
        } else {
            Log.e(TAG, "Got notification on OAD Identify while in unexpected state: " + oadState);
        }
    }
1241549
public function add($category)
    {
        if (is_array($category)) {
            $this->collection[] = new Category($category);
        } elseif (is_object($category) && $category instanceof Category) {
            $this->collection[] = $category;
        }

        return $this;
    }
1160426
public function add($opinion)
    {
        if (is_array($opinion)) {
            $this->collection[] = new ShopOpinion($opinion);
        } elseif (is_object($opinion) && $opinion instanceof ShopOpinion) {
            $this->collection[] = $opinion;
        }

        return $this;
    }
467045
public function addPersonImageVersion($value)
    {
        $currentArray = $this->getPersonImageVersions();
        $currentArray []= $value;
        $this->setPersonImageVersions($currentArray);

        return $this;
    }