PHP 클래스 SSLRealtimeModelDeck, sslscrobbler

Generally you would notify the deck of a bunch of SSLTracks (usually from the Serato History file) using notify(), and it would cherry pick relevant entries based on the deck number. After processing the Tracks, various status methods are pollable for the deck's current state and information about what changed. You may also ask the deck information about how long the current track has been playing for, etc.
또한 보기: SSLRealtimeModel for more info on the statuses, transitions and their meanings.
저자: ben
파일 보기 프로젝트 열기: ben-xo/sslscrobbler 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$deck_number
$end_time
$max_row
$pre_update_track SSLTrack Stores the track on the deck at the beginning of the update pass.
$previous_track SSLTrack Stores the last played track on the deck.
$start_time
$status
$track SSLTrack Stores the track currently on the deck.
$track_started
$track_stopped * Status flags that are updated by notify()
$track_updated

공개 메소드들

메소드 설명
__construct ( $deck_number )
getCurrentTrack ( ) : SSLTrack Returns the currently playing track or null if the deck is empty
getEndTime ( )
getPlaytime ( ) : integer Returns the play time of the track in seconds.
getPreviousTrack ( ) : SSLTrack Returns the previously played track or null if the deck was previously empty
getStartTime ( )
getStatus ( )
notify ( SSLHistoryDiffDom $diff ) Notify the deck of a group of changes written to the History File.
trackStarted ( ) Returns a track, if one started since the last notify.
trackStopped ( ) Returns a track, if one stopped since the last notify.
trackUpdated ( ) Returns a track, if one was updated since the last notify.
transitionTo ( SSLTrack $track ) Transition combinations

보호된 메소드들

메소드 설명
resetFlags ( )
transitionFromEmptyTo ( SSLTrack $track )
transitionFromEmptyToNew ( SSLTrack $track )
transitionFromNewTo ( SSLTrack $track )
transitionFromNewToPlaying ( SSLTrack $track )
transitionFromNewToSkipped ( SSLTrack $track )
transitionFromPlayedTo ( SSLTrack $track )
transitionFromPlayedToNew ( SSLTrack $track )
transitionFromPlayingTo ( SSLTrack $track )
transitionFromPlayingToPlayed ( SSLTrack $track )
transitionFromSkippedTo ( SSLTrack $track )
transitionFromSkippedToNew ( SSLTrack $track ) Base transitions

메소드 상세

__construct() 공개 메소드

public __construct ( $deck_number )

getCurrentTrack() 공개 메소드

Returns the currently playing track or null if the deck is empty
public getCurrentTrack ( ) : SSLTrack
리턴 SSLTrack

getEndTime() 공개 메소드

public getEndTime ( )

getPlaytime() 공개 메소드

Returns the play time of the track in seconds.
public getPlaytime ( ) : integer
리턴 integer

getPreviousTrack() 공개 메소드

Returns the previously played track or null if the deck was previously empty
public getPreviousTrack ( ) : SSLTrack
리턴 SSLTrack

getStartTime() 공개 메소드

public getStartTime ( )

getStatus() 공개 메소드

public getStatus ( )

notify() 공개 메소드

SSL batches writes of track info, but doesn't output them in the natural transition order - that is, sometimes information about the following song appears in the log before closing info on the previous song, as the History File is track oriented, not deck oriented. During notify(), we reorder this information into an order that's transition compatible (that is, row ID ascending order). The implication of sending a bunch of track notifications together (rather than one by one) is that they happen simultaneously, and the end result is what's important rather than every step to get there. As diffs usually only come during track load, change or eject, it would be abnormal to see information about more than 2 tracks on a single deck here, and abnormal for neither of them to be the one currently on the deck. However, it can happen - for example, loading a historical file or starting the monitor half way through a session.
public notify ( SSLHistoryDiffDom $diff )
$diff SSLHistoryDiffDom

resetFlags() 보호된 메소드

protected resetFlags ( )

trackStarted() 공개 메소드

Returns a track, if one started since the last notify.
public trackStarted ( )

trackStopped() 공개 메소드

Returns a track, if one stopped since the last notify.
public trackStopped ( )

trackUpdated() 공개 메소드

Returns a track, if one was updated since the last notify.
public trackUpdated ( )

transitionFromEmptyTo() 보호된 메소드

protected transitionFromEmptyTo ( SSLTrack $track )
$track SSLTrack

transitionFromEmptyToNew() 보호된 메소드

protected transitionFromEmptyToNew ( SSLTrack $track )
$track SSLTrack

transitionFromNewTo() 보호된 메소드

protected transitionFromNewTo ( SSLTrack $track )
$track SSLTrack

transitionFromNewToPlaying() 보호된 메소드

protected transitionFromNewToPlaying ( SSLTrack $track )
$track SSLTrack

transitionFromNewToSkipped() 보호된 메소드

protected transitionFromNewToSkipped ( SSLTrack $track )
$track SSLTrack

transitionFromPlayedTo() 보호된 메소드

protected transitionFromPlayedTo ( SSLTrack $track )
$track SSLTrack

transitionFromPlayedToNew() 보호된 메소드

protected transitionFromPlayedToNew ( SSLTrack $track )
$track SSLTrack

transitionFromPlayingTo() 보호된 메소드

protected transitionFromPlayingTo ( SSLTrack $track )
$track SSLTrack

transitionFromPlayingToPlayed() 보호된 메소드

protected transitionFromPlayingToPlayed ( SSLTrack $track )
$track SSLTrack

transitionFromSkippedTo() 보호된 메소드

protected transitionFromSkippedTo ( SSLTrack $track )
$track SSLTrack

transitionFromSkippedToNew() 보호된 메소드

Base transitions
protected transitionFromSkippedToNew ( SSLTrack $track )
$track SSLTrack

transitionTo() 공개 메소드

Transition combinations
public transitionTo ( SSLTrack $track )
$track SSLTrack

프로퍼티 상세

$deck_number 보호되어 있는 프로퍼티

protected $deck_number

$end_time 보호되어 있는 프로퍼티

protected $end_time

$max_row 보호되어 있는 프로퍼티

protected $max_row

$pre_update_track 보호되어 있는 프로퍼티

Stores the track on the deck at the beginning of the update pass.
protected SSLTrack $pre_update_track
리턴 SSLTrack

$previous_track 보호되어 있는 프로퍼티

Stores the last played track on the deck.
protected SSLTrack $previous_track
리턴 SSLTrack

$start_time 보호되어 있는 프로퍼티

protected $start_time

$status 보호되어 있는 프로퍼티

protected $status

$track 보호되어 있는 프로퍼티

Stores the track currently on the deck.
protected SSLTrack $track
리턴 SSLTrack

$track_started 보호되어 있는 프로퍼티

protected $track_started

$track_stopped 보호되어 있는 프로퍼티

* Status flags that are updated by notify()
protected $track_stopped

$track_updated 보호되어 있는 프로퍼티

protected $track_updated