PHP Class App\services\Download

Mostrar archivo Open project: phanan/koel Class Usage Examples

Public Methods

Method Description
from ( Song | Collection | Album | Artist | Playlist $mixed ) : string Generic method to generate a download archive from various source types.

Protected Methods

Method Description
fromAlbum ( Album $album )
fromArtist ( Artist $artist )
fromMultipleSongs ( Collection $songs ) : string Generate a downloadable path of multiple songs in zip format.
fromPlaylist ( Playlist $playlist )
fromSong ( Song $song ) : string Generate the downloadable path for a song.

Method Details

from() public method

Generic method to generate a download archive from various source types.
public from ( Song | Collection | Album | Artist | Playlist $mixed ) : string
$mixed app\models\Song | Collection | app\models\Album | app\models\Artist | app\models\Playlist
return string Full path to the generated archive

fromAlbum() protected method

protected fromAlbum ( Album $album )
$album app\models\Album

fromArtist() protected method

protected fromArtist ( Artist $artist )
$artist app\models\Artist

fromMultipleSongs() protected method

Generate a downloadable path of multiple songs in zip format.
protected fromMultipleSongs ( Collection $songs ) : string
$songs Illuminate\Support\Collection
return string

fromPlaylist() protected method

protected fromPlaylist ( Playlist $playlist )
$playlist app\models\Playlist

fromSong() protected method

Generate the downloadable path for a song.
protected fromSong ( Song $song ) : string
$song app\models\Song
return string