PHP Class app\models\Artist

User: davidtang Date: 2/1/16 Time: 10:18 PM
Show file Open project: phanan/koel Class Usage Examples

Protected Properties

Property Type Description
$guarded
$hidden

Public Methods

Method Description
albums ( )
get ( string $name ) : Artist Get an Artist object from their name.
getContributedSongs ( ) : Illuminate\Database\Eloquent\Collection Get songs *contributed* (in compilation albums) by the artist.
getImageAttribute ( mixed $value ) : string | null Turn the image name into its absolute URL.
getInfo ( ) : array | false Get extra information about the artist from Last.fm.
getNameAttribute ( $value ) : string Sometimes the tags extracted from getID3 are HTML entity encoded.
getVarious ( ) : Artist Get the "Various Artists" object.
isUnknown ( )
isVarious ( )
songs ( )

Method Details

albums() public method

public albums ( )

get() public static method

If such is not found, a new artist will be created.
public static get ( string $name ) : Artist
$name string
return Artist

getContributedSongs() public method

Get songs *contributed* (in compilation albums) by the artist.
public getContributedSongs ( ) : Illuminate\Database\Eloquent\Collection
return Illuminate\Database\Eloquent\Collection

getImageAttribute() public method

Turn the image name into its absolute URL.
public getImageAttribute ( mixed $value ) : string | null
$value mixed
return string | null

getInfo() public method

Get extra information about the artist from Last.fm.
public getInfo ( ) : array | false
return array | false

getNameAttribute() public method

This makes sure they are always sane.
public getNameAttribute ( $value ) : string
$value
return string

getVarious() public static method

Get the "Various Artists" object.
public static getVarious ( ) : Artist
return Artist

isUnknown() public method

public isUnknown ( )

isVarious() public method

public isVarious ( )

songs() public method

public songs ( )

Property Details

$guarded protected property

protected $guarded

$hidden protected property

protected $hidden