~kenmclean/phpmusicbrainz/trunk

« back to all changes in this revision

Viewing changes to mbInclude.php

  • Committer: ken
  • Date: 2010-07-25 15:27:49 UTC
  • Revision ID: svn-v4:16684f6d-c32f-4d85-9472-97e321f516ae:trunk:11
Added Release Group functionality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 Copyright 2009, 2010 Timothy John Wood, Paul Arthur MacIain
5
5
 
6
6
 This file is part of php_musicbrainz
7
 
 
 
7
 
8
8
 php_musicbrainz is free software: you can redistribute it and/or modify
9
9
 it under the terms of the GNU Lesser General Public License as published by
10
10
 the Free Software Foundation, either version 2.1 of the License, or
11
11
 (at your option) any later version.
12
 
 
 
12
 
13
13
 php_musicbrainz is distributed in the hope that it will be useful,
14
14
 but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
16
 GNU Lesser General Public License for more details.
17
 
 
 
17
 
18
18
 You should have received a copy of the GNU Lesser General Public License
19
19
 along with php_musicbrainz.  If not, see <http://www.gnu.org/licenses/>.
20
20
*/
70
70
    }
71
71
}
72
72
 
 
73
class mbReleaseGroupIncludes implements MusicBrainzInclude {
 
74
    private $includes;
 
75
 
 
76
    public function createIncludeTags() {
 
77
        return $this->includes;
 
78
    }
 
79
 
 
80
    public function artist() {
 
81
        $this->includes[] = 'artist';
 
82
        return $this;
 
83
    }
 
84
 
 
85
        public function releases() {
 
86
        $this->includes[] = 'releases';
 
87
        return $this;
 
88
    }
 
89
}
 
90
 
73
91
class mbReleaseIncludes implements MusicBrainzInclude {
74
92
    private $includes;
75
93
 
82
100
        return $this;
83
101
    }
84
102
 
 
103
    public function releaseGroup() {
 
104
        $this->includes[] = 'release-groups';
 
105
        return $this;
 
106
    }
 
107
 
85
108
    public function counts() {
86
109
        $this->includes[] = 'counts';
87
110
        return $this;