Metadata::getIPTC()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Jackal\ImageMerge\Metadata;
4
5
use Jackal\ImageMerge\Exception\ModuleNotFoundException;
6
use Jackal\ImageMerge\Metadata\Parser\ExifParser;
7
use Jackal\ImageMerge\Metadata\Parser\IPTCParser;
8
use Jackal\ImageMerge\Metadata\Parser\XMPParser;
9
use Jackal\ImageMerge\Model\File\FileObjectInterface;
10
11
/**
12
 * Class Metadata
13
 * @package Jackal\ImageMerge\Metadata
14
 */
15
class Metadata
16
{
17
    /**
18
     * @var ExifParser
19
     */
20
    private $exif;
21
22
    /**
23
     * @var XMPParser
24
     */
25
    private $xmp;
26
27
    /**
28
     * @var IPTCParser
29
     */
30
    private $iptc;
31
32
    /**
33
     * Metadata constructor.
34
     * @param FileObjectInterface $file
35
     * @throws ModuleNotFoundException
36
     */
37
    public function __construct(FileObjectInterface $file)
38
    {
39
        $this->exif = new ExifParser($file);
40
        $this->xmp = new XMPParser($file);
41
        $this->iptc = new IPTCParser($file);
42
    }
43
44
    /**
45
     * @return ExifParser
46
     */
47
    public function getExif()
48
    {
49
        return $this->exif;
50
    }
51
52
    /**
53
     * @return XMPParser
54
     */
55
    public function getXMP()
56
    {
57
        return $this->xmp;
58
    }
59
60
    /**
61
     * @return IPTCParser
62
     */
63
    public function getIPTC()
64
    {
65
        return $this->iptc;
66
    }
67
}
68