Esempio n. 1
0
 /**
  * @param Album  $album
  * @param string $title
  * @param int    $position
  *
  * @return $this
  *
  * @throws InvalidAlbumInputException
  */
 public function fromAlbum(Album $album, $title = "", $position = null)
 {
     $this->setArtist($album->getArtist());
     $this->setLabel($album->getLabel());
     $this->setManufacturer($album->getManufacturer());
     $this->setPublisher($album->getPublisher());
     $this->setReleaseDate($album->getReleaseDate());
     $this->setStudio($album->getStudio());
     $this->setAlbum($album);
     if (!empty($title)) {
         $this->setTitle($title);
     }
     if ($position >= 0) {
         $this->setTrackSequence($position);
     }
     return $this;
 }