Example #1
0
 /**
  * Delete an AlbumEntry.
  *
  * @param Zend_Gdata_Photos_AlbumEntry $album The album entry to
  *          delete.
  * @param boolean $catch Whether to catch an exception when
  *            modified and re-delete or throw
  * @return void.
  * @throws Zend_Gdata_App_Exception
  * @throws Zend_Gdata_App_HttpException
  */
 public function deleteAlbumEntry($album, $catch)
 {
     if ($catch) {
         try {
             $this->delete($album);
         } catch (Zend_Gdata_App_HttpException $e) {
             if ($e->getResponse()->getStatus() === 409) {
                 $entry = new Zend_Gdata_Photos_AlbumEntry($e->getResponse()->getBody());
                 $this->delete($entry->getLink('edit')->href);
             } else {
                 throw $e;
             }
         }
     } else {
         $this->delete($album);
     }
 }