Completed
Push — id3-metadata-objects ( 0cc3db...879c59 )
by Daniel
12:29
created

Reader::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * This file is part of the Metadata project.
4
 *
5
 * @author Daniel Schröder <[email protected]>
6
 */
7
8
namespace GravityMedia\Metadata\ID3v2;
9
10
use GravityMedia\Stream\Stream;
11
12
/**
13
 * ID3v2 reader class.
14
 *
15
 * @package GravityMedia\Metadata\ID3v2\Reader
16
 */
17
class Reader extends StreamContainer
18
{
19
    /**
20
     * @var int
21
     */
22
    private $version;
23
24
    /**
25
     * Create ID3v2 abstract frame reader object.
26
     *
27
     * @param Stream $stream
28
     * @param int    $version
29
     */
30
    public function __construct(Stream $stream, $version)
31
    {
32
        parent::__construct($stream);
33
34
        $this->version = $version;
35
    }
36
37
    /**
38
     * Get version.
39
     *
40
     * @return int
41
     */
42
    protected function getVersion()
43
    {
44
        return $this->version;
45
    }
46
}
47