Ejemplo n.º 1
0
 private function loadMusicFiche()
 {
     $oLastFM = new \LASTFM\LastFM(Config::get('lastFMApiKey'));
     try {
         $oAlbum = $oLastFM->getInfos('', '', $this->oRequest->getParam('fiche', 'string'));
         if ($oAlbum == null) {
             throw new Error('Aucune fiche ne correspond à l\'ID', 1163);
         }
         $oFicheMusic = new Fichemusic();
         $oFicheMusic->loadFromLastFM($oAlbum);
         $oFicheMusic->storeIfNotExists($this->oRelease->getId());
         return $oFicheMusic;
     } catch (Exception $e) {
         throw new Error('Aucune fiche ne correspond à l\'ID', 1163);
     }
 }