add authors, composers, history and settings to Tune::merge()
This commit is contained in:
@@ -283,6 +283,16 @@ class Tune implements EntityInterface
|
||||
call_user_func([$this, 'addAuthor'], $value);
|
||||
break;
|
||||
|
||||
case 'Composers':
|
||||
$this->addComposer($value);
|
||||
break;
|
||||
|
||||
case 'settings':
|
||||
foreach ($value as $key => $settingParams) {
|
||||
$this->addSetting(Setting::create($settingParams));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->append($attribute, $value);
|
||||
}
|
||||
@@ -333,6 +343,7 @@ class Tune implements EntityInterface
|
||||
/**
|
||||
* @param StringAtom $musicLine
|
||||
* @return $this
|
||||
* @deprecated this should be on the setting
|
||||
*/
|
||||
public function addMusicLine(string $musicLine)
|
||||
{
|
||||
@@ -350,6 +361,10 @@ class Tune implements EntityInterface
|
||||
{
|
||||
//TODO
|
||||
$this->titles = array_merge($this->getTitles(), $source->getTitles());
|
||||
$this->authors = array_merge($this->getAuthors(), $source->getAuthors());
|
||||
$this->composers = array_merge($this->getComposers(), $source->getComposers());
|
||||
$this->history = array_merge($this->getHistory(), $source->getHistory());
|
||||
$this->tuneSettings = array_merge($this->getSettings(), $source->getSettings());
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user