1 | <?php |
||
17 | class Tag |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $version; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $revision; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $padding; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $crc32; |
||
38 | |||
39 | /** |
||
40 | * @var int[] |
||
41 | */ |
||
42 | protected $restrictions; |
||
43 | |||
44 | /** |
||
45 | * @var Frame[] |
||
46 | */ |
||
47 | protected $frames; |
||
48 | |||
49 | /** |
||
50 | * Create ID3v2 tag object. |
||
51 | * |
||
52 | * @param int $version The version (default is 3: v2.3) |
||
53 | * @param int $revision The revision (default is 0) |
||
54 | * |
||
55 | * @throws InvalidArgumentException An exception is thrown on invalid version arguments |
||
56 | */ |
||
57 | public function __construct($version = Version::VERSION_23, $revision = 0) |
||
70 | |||
71 | /** |
||
72 | * Get version. |
||
73 | * |
||
74 | * @return int |
||
75 | */ |
||
76 | public function getVersion() |
||
80 | |||
81 | /** |
||
82 | * Get revision. |
||
83 | * |
||
84 | * @return int |
||
85 | */ |
||
86 | public function getRevision() |
||
90 | |||
91 | /** |
||
92 | * Get padding. |
||
93 | * |
||
94 | * @return int |
||
95 | */ |
||
96 | public function getPadding() |
||
100 | |||
101 | /** |
||
102 | * Set padding. |
||
103 | * |
||
104 | * @param int $padding |
||
105 | * |
||
106 | * @return $this |
||
107 | */ |
||
108 | public function setPadding($padding) |
||
114 | |||
115 | /** |
||
116 | * Get CRC-32. |
||
117 | * |
||
118 | * @return int |
||
119 | */ |
||
120 | public function getCrc32() |
||
124 | |||
125 | /** |
||
126 | * Set CRC-32. |
||
127 | * |
||
128 | * @param int $crc32 |
||
129 | * |
||
130 | * @return $this |
||
131 | */ |
||
132 | public function setCrc32($crc32) |
||
138 | |||
139 | /** |
||
140 | * Get restriction. |
||
141 | * |
||
142 | * @param int $restriction |
||
143 | * |
||
144 | * @return int |
||
145 | */ |
||
146 | public function getRestriction($restriction) |
||
154 | |||
155 | /** |
||
156 | * Set restrictions |
||
157 | * |
||
158 | * @param int[] $restrictions |
||
159 | * |
||
160 | * @return $this |
||
161 | */ |
||
162 | public function setRestrictions(array $restrictions) |
||
168 | |||
169 | /** |
||
170 | * Get frames |
||
171 | * |
||
172 | * @return Frame[] |
||
173 | */ |
||
174 | public function getFrames() |
||
178 | |||
179 | /** |
||
180 | * Add frame |
||
181 | * |
||
182 | * @param Frame $frame |
||
183 | * |
||
184 | * @return $this |
||
185 | */ |
||
186 | public function addFrame(Frame $frame) |
||
192 | } |
||
193 |