Skip to content
duck7000 edited this page Apr 3, 2026 · 38 revisions

Description of the working

You can use this class to fetch all data from a musicBrainz release

Calling the class

Call the class with a release ID (mbid) $music = new \Music\Title("649808bf-d4de-3717-80d1-ea016f7bb278");

fetchData

This will fetch all data from a specific release ID
It has no parameters as the class itself is called with a release ID
Caching can be used, set cache to true in config (Default: false)
Cover Art image urls will be re directed!
$results = $music->fetchData();
@return Data[] array of all available data from this release ID
array[]

 [id]                 (string) release id
 [title]              (string) release name
 [artist]             (array)  release artist(s) or group name
        [name] => (string) Artist or group name
        [id] =>   (string) Artist or group ID
        [alias] => Array (string)
            [0] => AC DC
            [1] => AC-DC
            [2] => AC.DC
            [3] => AC/DC
            [4] => AC?DC
            [5] => ACDC
            [6] => AC\DC
            [7] => AC|DC
            [8] => AC⚡DC
            [9] => AC⚡︎DC
            [10] => Acca Dacca
            [11] => Akka Dakka
 [year]               (int)    release year
 [date]               (string) date of this specific release e.g 1988, 1988-10-01, 1988-10
 [firstReleaseDate]   (string) release group first release date
 [country]            (string) country of release e.g United States (or Continent: Europe, World Wide)
 [length]             (int)    Total play length in seconds
 [barcode]            (int)    barcode found on the back cover for this release
 [annotation]         (string) extended text, or short description
 [disambiguation]     (string) usually price codes
 [status]             (string) status of this release e.g original or bootleg
 [packaging]          (string) like jewel case
 [primaryType]        (string) like album or EP
 [secondaryTypes]     (array)  secondary album type(s)
 [releaseGroupId]     (string) c9673ff0-15b5-394d-a5ec-3d2a27dfce83
 [genres]             (array)  All genres for this release in indexed array
 [releaseGroupGenres] (array)  All release group genres for this release in indexed array
 [releaseGroupUrls] => Array()
     [0] => array()
         [type] => (string) e.g. wikidata
         [url] => (string) e.g https://www.wikidata.org/wiki/Q832786
 [tags]               (array)  All tags for this release in indexed array
 [labels]             (array)  All labels this release is released on
        [name] =>     (string) label name
        [id] =>       (string) label ID
        [type] =>     (string) label type like Imprint
        [code] =>     (string) label code
        [catalog] =>  (string) label catalog number
 [media]              (array)  release format and tracks
        [mediumTitle] => live from atlantic studios
        [format] =>   (string) format like cd or vinyl
        [tracks] =>   (array)  tracks
               [id] =>       (string) track ID
               [number] =>   (string) track number (for vinyl this can be A1 or A01)
               [title] =>    (string) track title
               [artist] => Array
                     [name] =>        (string) Artist name
                     [id] =>          (string) Artist ID
                     [joinphrase] =>  (string) Featuring another artist
               [length] =>   (int) track play length in seconds
        [discids] => Array()
            [0] => 8VcyV_HgVNgXje7IgY6NndMP8Tk-
            [1] => GI8Gdv0JZhh9yZyvQMvrauUbz.I-
 [relations]          (array)  release relations like artists, composers and urls
        [credits][category] =>   (array)  Artist info like composer or instrument players
               [begin] =>      (string)  begin date
               [end] =>        (string)  end date
               [artist] =>     (array)   artist personal info
                      [name] =>           (string) Artist name
                      [id] =>             (string) Artist ID
                      [disambiguation] => (string) short description
               [attributes] => (array)   Additional info in indexed array
 [coverArt] => Array()
     [front] => Array()
         [id] =>          (int)
         [originalUrl] => (string)  Untouched image url
         [thumbUrl] =>    (string)  250 pixels image url
         [mediumUrl] =>   (string)  500 pixels image url
         [largeUrl] =>    (string)  1200 pixels image url
     [back] => Array()
         [id] =>          (int)
         [originalUrl] => (string)  Untouched image url
         [thumbUrl] =>    (string)  250 pixels image url
         [mediumUrl] =>   (string)  500 pixels image url
         [largeUrl] =>    (string)  1200 pixels image url
     [booklet] => Array()
         [0] => Array()
             [id] =>          (int)
             [originalUrl] => (string)  Untouched image url
             [thumbUrl] =>    (string)  250 pixels image url
             [mediumUrl] =>   (string)  500 pixels image url
             [largeUrl] =>    (string)  1200 pixels image url
         [1] => Array()
             [id] =>          (int)
             [originalUrl] => (string)  Untouched image url
             [thumbUrl] =>    (string)  250 pixels image url
             [mediumUrl] =>   (string)  500 pixels image url
             [largeUrl] =>    (string)  1200 pixels image url

Clone this wiki locally