public function addPhoto($photo)
    {
        $photos = AnHelperArray::getIterator($photo);

        foreach ($photos as $photo) {
            if (!$this->photos->find($photo)) {
                $this->photos->insert($photo, array(
                     'author' => $photo->author,
                ));
            }
        }
    }
public function addPhoto($photo)
    {
        $photos = AnHelperArray::getIterator($photo);

        foreach ($photos as $photo) {
            if (!$this->photos->find($photo)) {
                $this->photos->insert($photo, array(
                     'author' => $photo->author,
                ));
            }
        }
    }
public function addPhoto ( $ photo ) { $ photos = AnHelperArray :: getIterator ( $ photo ) ; foreach ( $ photos as $ photo ) { if ( ! $ this -> photos -> find ( $ photo ) ) { $ this -> photos -> insert ( $ photo , array ( 'author' => $ photo -> author , ) ) ; } } }
Adds a photo to a set.

@return true on success

@param $photo a ComPhotosDomainEntityPhoto object
Adds a photo to a set .