コード例 #1
0
ファイル: ApiFactory.php プロジェクト: rezzza/flickr
 /**
  * Replace an exitant photo by a new one
  *
  * http://www.flickr.com/services/api/replace.api.html
  *
  * @param string  $photoId photoId
  * @param string  $file    file
  * @param boolean $async   async
  *
  * @return \SimpleXMLElement
  */
 public function replace($photoId, $file, $async = false)
 {
     $path = realpath($file);
     if (false === $path) {
         throw new \LogicException(sprintf('File "%s" does not exists.', $file));
     }
     $parameters = array('photo' => '@' . $path, 'photo_id' => $photoId, 'async' => $async);
     return $this->call(null, $parameters, $this->metadata->getReplaceEndpoint());
 }