public function __construct(UserBand $userBand, $title, \DateTime $releaseDate, $source) { parent::__construct($title, $releaseDate); $this->userBand = $userBand; $this->source = $source; $this->user = $userBand->getUser(); }
/** * 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); }