app\models\Artist::getVarious PHP 메소드

getVarious() 공개 정적인 메소드

Get the "Various Artists" object.
public static getVarious ( ) : Artist
리턴 Artist
    public static function getVarious()
    {
        return self::find(self::VARIOUS_ID);
    }

Usage Example

예제 #1
0
파일: Album.php 프로젝트: phanan/koel
 /**
  * Get an album using some provided information.
  *
  * @param Artist $artist
  * @param string $name
  * @param bool   $isCompilation
  *
  * @return self
  */
 public static function get(Artist $artist, $name, $isCompilation = false)
 {
     // If this is a compilation album, its artist must be "Various Artists"
     if ($isCompilation) {
         $artist = Artist::getVarious();
     }
     return self::firstOrCreate(['artist_id' => $artist->id, 'name' => $name ?: self::UNKNOWN_NAME]);
 }
All Usage Examples Of app\models\Artist::getVarious