PHP Class App\Console\Commands\SyncMedia

Inheritance: extends Illuminate\Console\Command
ファイルを表示 Open project: phanan/koel Class Usage Examples

Protected Properties

Property Type Description
$bar Symfony\Component\Console\Helper\ProgressBar The progress bar.
$description string The console command description.
$ignored
$invalid
$signature string The name and signature of the console command.
$synced

Public Methods

Method Description
createProgressBar ( integer $max ) Create a progress bar.
handle ( ) : mixed Execute the console command.
logToConsole ( string $path, mixed $result, string $reason = '' ) Log a song's sync status to console.
syngle ( string $record ) SYNc a sinGLE file or directory. See my awesome pun?
updateProgressBar ( ) Update the progress bar (advance by 1 step).

Protected Methods

Method Description
syncAll ( ) Sync all files in the configured media path.

Method Details

createProgressBar() public method

Create a progress bar.
public createProgressBar ( integer $max )
$max integer Max steps

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed

logToConsole() public method

Log a song's sync status to console.
public logToConsole ( string $path, mixed $result, string $reason = '' )
$path string
$result mixed
$reason string

syncAll() protected method

Sync all files in the configured media path.
protected syncAll ( )

syngle() public method

SYNc a sinGLE file or directory. See my awesome pun?
public syngle ( string $record )
$record string The watch record. As of current we only support inotifywait. Some examples: - "DELETE /var/www/media/gone.mp3" - "CLOSE_WRITE,CLOSE /var/www/media/new.mp3" - "MOVED_TO /var/www/media/new_dir"

updateProgressBar() public method

Update the progress bar (advance by 1 step).
public updateProgressBar ( )

Property Details

$bar protected_oe property

The progress bar.
protected ProgressBar,Symfony\Component\Console\Helper $bar
return Symfony\Component\Console\Helper\ProgressBar

$description protected_oe property

The console command description.
protected string $description
return string

$ignored protected_oe property

protected $ignored

$invalid protected_oe property

protected $invalid

$signature protected_oe property

The name and signature of the console command.
protected string $signature
return string

$synced protected_oe property

protected $synced