예제 #1
0
파일: Helper.php 프로젝트: stdtabs/phptabs
 protected function isPercussionChannel(Song $song, $channelId)
 {
     $channels = $song->getChannels();
     foreach ($channels as $channel) {
         if ($channel->getChannelId() == $channelId) {
             return $channel->isPercussionChannel();
         }
     }
     return false;
 }
예제 #2
0
 public function copyFrom(Song $song)
 {
     $this->clear();
     $this->setName($song->getName());
     $this->setArtist($song->getArtist());
     $this->setAlbum($song->getAlbum());
     $this->setAuthor($song->getAuthor());
     $this->setDate($song->getDate());
     $this->setCopyright($song->getCopyright());
     $this->setWriter($song->getWriter());
     $this->setTranscriber($song->getTranscriber());
     $this->setComments($song->getComments());
     $headers = $song->getMeasureHeaders();
     foreach ($headers as $header) {
         $this->addMeasureHeader(clone $header);
     }
     $channels = $song->getChannels();
     foreach ($channels as $channel) {
         $this->addChannel(clone $channel);
     }
     $tracks = $song->getTracks();
     foreach ($tracks as $track) {
         $this->addTrack(clone $track);
     }
 }