本文整理汇总了PHP中Track::getNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP Track::getNumber方法的具体用法?PHP Track::getNumber怎么用?PHP Track::getNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Track
的用法示例。
在下文中一共展示了Track::getNumber方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeTrack
public function removeTrack(Track $track)
{
foreach ($this->tracks as $k => $v) {
if ($v->getNumber() == $track->getNumber()) {
array_splice($this->tracks, $k, 1);
}
}
$track->clear();
}
示例2: copyFrom
public function copyFrom(Song $song, Track $track)
{
$this->clear();
$this->setNumber($track->getNumber());
$this->setName($track->getName());
$this->setOffset($track->getOffset());
$this->setSolo($track->isSolo());
$this->setMute($track->isMute());
$this->setChannelId($track->getChannelId());
$this->getColor()->copyFrom($track->getColor());
$this->getLyrics()->copyFrom($track->getLyrics());
for ($i = 0; $i < $track->countStrings(); $i++) {
$this->strings[$i] = clone $track->getString($i);
}
for ($i = 0; $i < $track->countMeasures(); $i++) {
$measure = $track->getMeasure($i);
$this->addMeasure(clone $measure($song->getMeasureHeader($i)));
}
}