Exemplo n.º 1
0
 public function __construct(UserBand $userBand, $title, \DateTime $releaseDate, $source)
 {
     parent::__construct($title, $releaseDate);
     $this->userBand = $userBand;
     $this->source = $source;
     $this->user = $userBand->getUser();
 }
Exemplo n.º 2
0
 /**
  * Populates the specified user band with values from the specified dto.
  *
  * @param \MetaPlayer\Model\UserBand $userBand
  * @param BandDto $dto
  */
 public function populateUserBandWithDto(UserBand $userBand, BandDto $dto)
 {
     $userBand->setName($this->trimText($dto->name));
     $userBand->setFoundDate(ViewHelper::parseDate($dto->foundDate));
     $userBand->setEndDate(ViewHelper::parseDate($dto->endDate));
     $userBand->setSource($dto->source);
 }