Esempio n. 1
0
 /**
  * @param \MetaPlayer\Model\BaseAlbum $album
  * @return AlbumDto
  */
 private function convertBaseAlbumToDto(BaseAlbum $album)
 {
     $dto = new AlbumDto();
     $dto->id = $album->getId();
     $dto->releaseDate = ViewHelper::formatDate($album->getReleaseDate());
     $dto->bandId = $album->getBand()->getId();
     $dto->title = $album->getTitle();
     return $dto;
 }
Esempio n. 2
0
 public function __construct(UserBand $userBand, $title, \DateTime $releaseDate, $source)
 {
     parent::__construct($title, $releaseDate);
     $this->userBand = $userBand;
     $this->source = $source;
     $this->user = $userBand->getUser();
 }
Esempio n. 3
0
 /**
  * @param Band $band
  * @param string $title
  * @param \DateTime $releaseDate
  */
 public function __construct(Band $band, $title, \DateTime $releaseDate)
 {
     $this->band = $band;
     parent::__construct($title, $releaseDate);
 }