Add photo to collection

@param ModelVisualPhoto|array $photo

@return ModelVisualPhotos
965889
public function add($photo)
    {
        if (is_array($photo)) {
            $this->collection[] = new ModelVisualPhoto($photo);
        } elseif (is_object($photo) && $photo instanceof ModelVisualPhoto) {
            $this->collection[] = $photo;
        }

        return $this;
    }
1364395
public function add(array $collection)
    {
        foreach ($collection as $data) {
            $breadcrumb = new Breadcrumb();
            $breadcrumb->setName($data['name'])
                       ->setLink(isset($data['link']) ? $data['link'] : '#');

            array_push($this->collection, $breadcrumb);
        }

        return $this;
    }
358866
public function add( $element ) {
		if ( $this->type->is_model() && is_array( $element ) ) {
			$element = $this->type->create_model( $element );
		}

		$this->type->validate_element( $element );

		$elements   = $this->elements;
		$elements[] = $element;

		$collection = new static( $this->get_type() );
		$collection->set_from_trusted( $elements );

		return $collection;
	}
232629
public function addImage($image, $desc = null, $title = null)
    {
        return $this->addAttachment($desc, $title, $image);
    }
972489
public function removePhoto($photo)
    {
        $photos = AnHelperArray::getIterator($photo);

        foreach ($photos as $photo) {
            if ($edge = $this->photos->find($photo)) {
                $edge->delete();
            }
        }
    }
1234692
public function addImage(\Elcodi\Component\Media\Entity\Interfaces\ImageInterface $image)
    {
        $this->images->add($image);

        return $this;
    }
1105735
def attach_photo(self, photo: String, caption: String = None):
        
        self.media.attach_photo(photo, caption)
        return self
1090471
public static function find($id)
    {
        $photo = json_decode(self::get("/photos/{$id}")->getBody(), true);

        return new self($photo);
    }
1001444
public function addImage($source = null, $attributes = [])
    {
        $validKeys = [
            'url',
            'secure_url',
            'type',
            'width',
            'height',
        ];

        if (is_array($source)) {
            $this->images[] = $this->cleanProperties($source, $validKeys);
        } else {
            $this->images[] = [
                $source,
                $this->cleanProperties($attributes, $validKeys),
            ];
        }

        return $this;
    }
527820
public function add($offer)
    {
        if (is_array($offer)) {
            $this->collection[] = new MarketModelOffer($offer);
        } elseif ($offer instanceof MarketModelOffer) {
            $this->collection[] = $offer;
        }

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

        return $this;
    }
859062
def add(self, photo):
        """"""
        method = 'flickr.groups.pools.add'
        _dopost(method, auth=True, photo_id=photo.id, group_id=self.id)
        return True
1265982
public function addImage(Shopgate_Model_Media_Image $image)
    {
        $images = $this->getImages();
        array_push($images, $image);
        $this->setImages($images);
    }
1114571
private function saveToDatabase(Collection $collection)
    {
        $model = new ImageuploadModel();
        $fillable = $model->getFillable();
        $input = $collection->only($fillable)->toArray();

        $dimensions = $collection['dimensions'];

        foreach ($dimensions as $key => $dimension) {
            foreach ($dimension as $k => $v) {
                $input[$key.'_'.$k] = $v;
            }
        }

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

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

        return $this;
    }
32626
function photos_notes_add($photo_id, $note_x, $note_y, $note_w, $note_h, $note_text)
    {
        /** http://www.flickr.com/services/api/flickr.photos.notes.add.html */
        $this->request("flickr.photos.notes.add", array("photo_id" => $photo_id, "note_x" => $note_x, "note_y" => $note_y, "note_w" => $note_w, "note_h" => $note_h, "note_text" => $note_text), TRUE);
        return $this->parsed_response ? $this->parsed_response['note'] : false;
    }