Method to check to see if a photo already exists within an event

@param integer $eventId
@param string $photoFileName
@return array
359908
public function photoExistsInEvent($eventId, $photoFileName)
    {
        if (is_null($eventId) || $eventId == '') {
            throw new Exception('The eventId is required to check if a photo exists.');
        }

        if (is_null($photoFileName) || $photoFileName == '') {
            throw new Exception('The photoFileName is required to check if a photo exists.');
        }

        $params = array(
            'method' => 'sp.event.photo_exists',
            'event_id' => $eventId,
            'photo_name' => $photoFileName
        );

        return $this->_makeApiRequest($params);
    }
103919
public function file_exists($contextid, $component, $filearea, $itemid, $filepath, $filename) {
        $filepath = clean_param($filepath, PARAM_PATH);
        $filename = clean_param($filename, PARAM_FILE);

        if ($filename === '') {
            $filename = '.';
        }

        $pathnamehash = $this->get_pathname_hash($contextid, $component, $filearea, $itemid, $filepath, $filename);
        return $this->file_exists_by_hash($pathnamehash);
    }
724903
public function get_album_photos($albumid) {
        $albumcontent = $this->googleoauth->get(self::ALBUM_PHOTO_LIST.$albumid);

        return $this->get_photo_details($albumcontent);
    }
1169509
function getPhotoById($photoId) {
        $photos = new Zend_Gdata_Photos($this->client);
        $query = new Zend_Gdata_Photos_PhotoQuery();
        $query->setUser($this->user);
        $query->setAlbumId($this->album);
        $query->setPhotoId($photoId);
        $query = $query->getQueryUrl() . "?kind=comment,tag&imgmax=1600";
        
        $photoFeed = $photos->getPhotoFeed($query);
        return $photoFeed;
    }
376834
function PhotoItem({ id, username, src, name }) {
  return (
    <div key={id} className="col-3@xs col-4@sm photo-item">
      <div className="aspect aspect--4x3">
        <div className="aspect__inner">
          <img src={src} />
          <PhotoAttribution username={username} name={name} />
        </div>
      </div>
    </div>
  )
}
1247739
public function imageExists(Image $client, $hash, $organizationName = '')
    {
        try {
            $sourceImage = $client->getSourceImage($hash, $organizationName);

            return $sourceImage instanceof SourceImage && $sourceImage->hash === $hash;
        } catch (ClientException $e) {
            if (404 === $e->getCode()) {
                return false;
            }

            throw $e;
        }
    }
342447
public function indexExists(IndexEvent $event)
    {
        $exists = $this->getClient()->indices()->exists(array(
            "index" => $event->getIndexName(),
        ));

        if (false === $exists) {
            throw new IndexNotFoundException(sprintf("The index type '%s' doesn't exist", $event->getIndexName()));
        }
    }
1144939
protected function checkServiceEventMethodName($serviceEvent, $eventMethodName)
    {
        if (false === in_array($eventMethodName, self::$servicesChecked[$serviceEvent])) {
            $eventClassReflection = ReflectionService::get()->getClassReflection($serviceEvent);
            self::$servicesChecked[$serviceEvent][] = $eventMethodName;

            if (false === $eventClassReflection->hasMethod($eventMethodName)) {
                throw new MethodNotFoundException(
                    'The service event "' . $serviceEvent . '" does not have a method called "' . $eventMethodName . '".',
                    1456509926
                );
            }
        }
    }
435123
public function isEqual(Event $event)
    {
        try {
            return $this->getName() === $event->getName()
            && $this->get('id') === $event->get('id')
            && self::getSortedKeys($this->getParameters()) === self::getSortedKeys($event->getParameters());
        } catch (\Exception $e) {
        }

        return false;
    }
1098862
public Photo getListPhoto(String photoId) throws FlickrException {

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_LIST_PHOTO);

        parameters.put("photo_id", photoId);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }

        Element photoElement = response.getPayload();
        Photo photo = new Photo();
        photo.setId(photoElement.getAttribute("id"));

        List<Tag> tags = new ArrayList<Tag>();
        Element tagsElement = (Element) photoElement.getElementsByTagName("tags").item(0);
        NodeList tagElements = tagsElement.getElementsByTagName("tag");
        for (int i = 0; i < tagElements.getLength(); i++) {
            Element tagElement = (Element) tagElements.item(i);
            Tag tag = new Tag();
            tag.setId(tagElement.getAttribute("id"));
            tag.setAuthor(tagElement.getAttribute("author"));
            tag.setAuthorName(tagElement.getAttribute("authorname"));
            tag.setRaw(tagElement.getAttribute("raw"));
            tag.setValue(((Text) tagElement.getFirstChild()).getData());
            tags.add(tag);
        }
        photo.setTags(tags);
        return photo;
    }
881519
public function getBeforeDay($days = 7,$eventTypeId = null)
    {
        $this->getByDays($days);

        if(!is_null($eventTypeId))
            $this->eventQuery->where('point_event_type_id' ,$eventTypeId);

        return $this->doQuery();
    }
250583
public function getEventLog(Event $event, $eventName)
    {
        $eventLog = $this->getEventLogObject($this->getEventLogInfo($event, $eventName));

        if (null === $eventLog) {
            return null;
        }

        $eventLog->setTypeId($eventName);
        $eventLog->setIp($this->getClientIp());
        $eventLog->setEventTime(new \DateTime());
        $this->setUser($eventLog);

        return $eventLog;
    }
1374894
protected function processCallbacksFor($eventName, File $file)
    {
        if (! array_key_exists($eventName, $this->callbacks) || empty($this->callbacks[$eventName])) {
            return;
        }

        foreach ($this->callbacks[$eventName] as $callback) {
            $callback($file);
        }
    }
997775
public static function isUniqueExist( $name, $countryId, $provinceId ) {

		$city = self::findUnique( $name, $countryId, $provinceId );

		return isset( $city );
	}
1234895
public PersonTagList<PersonTag> getList(String photoId) throws FlickrException {

        // Delegating this to photos.people.PeopleInterface - Naming standard would be to use PeopleInterface but having 2 the same name can cause issues
        com.flickr4java.flickr.photos.people.PeopleInterface pi = new com.flickr4java.flickr.photos.people.PeopleInterface(apiKey, sharedSecret, transportAPI);
        return pi.getList(photoId);
    }
98937
public function rename($fileID, $name)
    {
        $data = [
            'file_id' => $fileID,
            'name'    => $name
        ];

        return $this->post('files/rename', $data, \true);
    }
86836
public function GetEventStatsForAccountV1($eventid, $accountid, $language = null)
    {
        return $this->_call(__METHOD__, 'GET', array('eventid' => $eventid, 'accountid' => $accountid, 'language' => $language));
    }