/** * 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 (App\HttpException $e) { if ($e->getResponse()->getStatus() === 409) { $entry = new AlbumEntry($e->getResponse()->getBody()); $this->delete($entry->getLink('edit')->href); } else { throw $e; } } } else { $this->delete($album); } }