1 | <?php |
||
20 | class TagWriter |
||
21 | { |
||
22 | /** |
||
23 | * @var MetadataInterface |
||
24 | */ |
||
25 | protected $metadata; |
||
26 | |||
27 | /** |
||
28 | * @var StreamInterface |
||
29 | */ |
||
30 | protected $stream; |
||
31 | |||
32 | /** |
||
33 | * Create ID3v1 tag writer object. |
||
34 | * |
||
35 | * @param MetadataInterface $metadata |
||
36 | * @param StreamInterface $stream |
||
37 | */ |
||
38 | public function __construct(MetadataInterface $metadata, StreamInterface $stream) |
||
43 | |||
44 | /** |
||
45 | * Pad data. |
||
46 | * |
||
47 | * @param string $data The data to pad |
||
48 | * @param int $length The final length |
||
49 | * @param int $type The type of padding |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | protected function padData($data, $length, $type) |
||
57 | |||
58 | /** |
||
59 | * Write ID3v1 tag. |
||
60 | * |
||
61 | * @param TagInterface $tag |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function write(TagInterface $tag) |
||
94 | } |
||
95 |